Skip to content

Instantly share code, notes, and snippets.

@slightlytyler
Last active August 29, 2019 20:01
Show Gist options
  • Save slightlytyler/ee38c42de602d1bbb6021a5db45bd4db to your computer and use it in GitHub Desktop.
Save slightlytyler/ee38c42de602d1bbb6021a5db45bd4db to your computer and use it in GitHub Desktop.
Dockerfile.dev for slightlytyler/docker-nginx-demo
FROM node:11.1.0-alpine AS node_base
FROM node_base as deps
WORKDIR /usr/app
COPY package.json /usr/app/package.json
COPY yarn.lock /usr/app/yarn.lock
RUN yarn install
FROM node_base as dev
WORKDIR /usr/app
COPY --from=deps /usr/app/node_modules /usr/app/node_modules
COPY . /usr/app
ENTRYPOINT ["yarn"]
@retyui
Copy link

retyui commented Aug 29, 2019

COPY package.json /usr/app/package.json
COPY yarn.lock /usr/app/yarn.lock

to

COPY yarn.lock package.json /usr/app/

?

@slightlytyler
Copy link
Author

Think I had it this way to keep it simple for the medium tutorial. The latter is definitely is probably more succinct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment