Created
November 18, 2020 01:51
-
-
Save Kristian-Roopnarine/8e970b117f7bda62f7141771a45192fc to your computer and use it in GitHub Desktop.
Dev Dockerfile
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
# 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