Created
August 10, 2021 03:32
-
-
Save deven96/86d9e6d1bce40202dc5e19c131fdd037 to your computer and use it in GitHub Desktop.
A better Dockerfile
This file contains hidden or 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
# pull official base image | |
FROM node:13.12.0-alpine | |
# set working directory to /app | |
WORKDIR /app | |
# add `/app/node_modules/.bin` to $PATH | |
ENV PATH /app/node_modules/.bin:$PATH | |
# copy package files to /app and install | |
COPY package.json ./ | |
COPY package-lock.json ./ | |
RUN npm install --silent | |
# copy rest of project to /app | |
COPY project/ ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment