Last active
February 16, 2020 15:59
-
-
Save suryaajha/dfa9ee122634c7944474ff8fe0575af5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Importing from the ubuntu:latest image | |
FROM ubuntu:latest | |
# End Importing from the ubuntu:latest image | |
# Updating Distribution Packages | |
RUN apt update -y \ | |
&& apt upgrade -y \ | |
&& apt dist-upgrade -y | |
# End Updating Distribution Packages | |
# Adding Runtime i.e nodejs | |
RUN apt install curl -y \ | |
&& curl -sL https://deb.nodesource.com/setup_12.x | bash - \ | |
&& apt install nodejs -y | |
# End Adding Runtime i.e nodejs | |
# Installing dependencies for the project | |
WORKDIR /usr/src/app | |
COPY package.json . | |
RUN npm install | |
# End Installing dependencies for the project | |
# Copy all the code to the /usr/src/app directory | |
COPY . . | |
# What to run when someone says docker run | |
CMD ["npm", "start"] | |
# End of The file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment