diff --git a/Dockerfile b/Dockerfile index 8d9c265..0eb7f8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,19 @@ -FROM node:19-alpine +FROM node:20-alpine ENV PORT 8080 WORKDIR /usr/src/app + RUN apk add --no-cache git +RUN apt-get update COPY . . + + +# Create a user for improved security +RUN addgroup -S usergroup +RUN adduser -S -D -h /usr/app/src appuser usergroup +RUN chown -R appuser:usergroup /usr/app +USER appuser + EXPOSE 8080 CMD ["npm", "start", "--no-update-notifier"] \ No newline at end of file