Skip to content

Instantly share code, notes, and snippets.

@praveenweb
Created February 7, 2018 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save praveenweb/5a1b3a7ba52d160361bb1830fc43b27d to your computer and use it in GitHub Desktop.
Save praveenweb/5a1b3a7ba52d160361bb1830fc43b27d to your computer and use it in GitHub Desktop.
FROM node:carbon
# Create app directory
WORKDIR /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 src /app
EXPOSE 8080
CMD [ "node", "server.js" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment