Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:latest
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest tag is not best practice to use, we require node 17. So we can go for node:17.9.0-slim

WORKDIR /app
RUN useradd admin
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to use user name same as application name

ENV MONGO_URL=""
COPY . .
RUN npm install
EXPOSE 1004
RUN apt-get update -y
RUN apt-get install libcap2-bin -y
USER admin
CMD ["npm","start"]