Skip to content

Instantly share code, notes, and snippets.

@Kristian-Roopnarine
Created November 18, 2020 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kristian-Roopnarine/8e970b117f7bda62f7141771a45192fc to your computer and use it in GitHub Desktop.
Save Kristian-Roopnarine/8e970b117f7bda62f7141771a45192fc to your computer and use it in GitHub Desktop.
Dev Dockerfile
# base image that comes with NodeJS
FROM node:14.15-alpine
# set working directory inside Docker container
WORKDIR /app
# add node to path to access npm commands from cli
ENV PATH /app/node_modules/.bin:$PATH
# copy package.json and package-lock to install dependencies in Docker container
COPY package.json ./
COPY package-lock.json ./
# install dependencies
RUN npm install --silent
# add other files from app to Docker container
COPY . ./
# will change after react is added
CMD ["npm","run","server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment