Skip to content

Instantly share code, notes, and snippets.

@suryaajha
Last active February 16, 2020 15:59
Show Gist options
  • Save suryaajha/dfa9ee122634c7944474ff8fe0575af5 to your computer and use it in GitHub Desktop.
Save suryaajha/dfa9ee122634c7944474ff8fe0575af5 to your computer and use it in GitHub Desktop.
# 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