From 6eba3ad9aba2a34490fac12cda59a4928ccb7d9c Mon Sep 17 00:00:00 2001 From: Jerome Fitzgerald Date: Thu, 18 Oct 2018 18:36:04 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=EF=B8=8F=20multistage:=20remove=20?= =?UTF-8?q?devDependencies=20(#5477)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker Multistage * Remove `devDependencies` from `./node_modules` in `builder` for faster copy on `base` init * Added `isomorphic-unfetch` to show it not being copied over to `base`. * `isomorphic-fetch` will still show from `next` --- examples/with-docker/Dockerfile.multistage | 2 +- examples/with-docker/package.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/with-docker/Dockerfile.multistage b/examples/with-docker/Dockerfile.multistage index ebf28bf6..937a0c09 100644 --- a/examples/with-docker/Dockerfile.multistage +++ b/examples/with-docker/Dockerfile.multistage @@ -4,7 +4,7 @@ WORKDIR /app COPY package.json . RUN yarn install COPY . . -RUN yarn build +RUN yarn build && yarn --production # And then copy over node_modules, etc from that stage to the smaller base image FROM mhart/alpine-node:base diff --git a/examples/with-docker/package.json b/examples/with-docker/package.json index d309591c..58bde347 100644 --- a/examples/with-docker/package.json +++ b/examples/with-docker/package.json @@ -11,5 +11,8 @@ "react": "16.2.0", "react-dom": "16.2.0" }, + "devDependencies": { + "isomorphic-unfetch": "^3.0.0" + }, "license": "ISC" }