Created
October 14, 2017 17:52
-
-
Save nickdandakis/1366b77a26de6d1180207a31edf131a0 to your computer and use it in GitHub Desktop.
Basic Dockerfile for Node applications
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:alpine | |
# Create app directory | |
RUN mkdir -p /usr/src | |
WORKDIR /usr/src | |
# Install app dependencies | |
COPY package.json /usr/src/ | |
COPY package-lock.json /usr/src/ | |
RUN npm install | |
# Bundle app source | |
COPY . /usr/src | |
RUN npm run build | |
EXPOSE 3000 | |
CMD ["npm", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment