Created
January 26, 2022 15:29
-
-
Save bharatc9530/a73385c20c22f22cf12d2ba092a5fdac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:13-alpine | |
ENV MONGO_DB_USERNAME=admin \ | |
MONGO_DB_PWD=password | |
RUN mkdir -p /home/app | |
COPY ./app /home/app | |
# set default dir so that next commands executes in /home/app dir | |
WORKDIR /home/app | |
# will execute npm install in /home/app because of WORKDIR | |
RUN npm install | |
# no need for /home/app/server.js because of WORKDIR | |
CMD ["node", "server.js"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment