Skip to content

Instantly share code, notes, and snippets.

@praveenweb
Created February 7, 2018 11:44
Show Gist options
  • Save praveenweb/92517e26f244260d26569908f8cd8227 to your computer and use it in GitHub Desktop.
Save praveenweb/92517e26f244260d26569908f8cd8227 to your computer and use it in GitHub Desktop.
FROM node:carbon
# Create app directory
WORKDIR /app
# Install nodemon for hot reload
RUN npm install -g nodemon
# 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
# Bundle app source
COPY src /app
EXPOSE 8080
CMD [ "nodemon", "server.js" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment