Skip to content

Instantly share code, notes, and snippets.

@tpfwrz
Created March 2, 2018 18:50
Show Gist options
  • Select an option

  • Save tpfwrz/079053ec406c3d7cda27faa653097c5b to your computer and use it in GitHub Desktop.

Select an option

Save tpfwrz/079053ec406c3d7cda27faa653097c5b to your computer and use it in GitHub Desktop.
Nodejs docker file
FROM node
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment