Commit 6eba3ad9 authored by Jerome Fitzgerald's avatar Jerome Fitzgerald Committed by Tim Neutkens

🐳️ multistage: remove devDependencies (#5477)

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`
parent 9634bad7
...@@ -4,7 +4,7 @@ WORKDIR /app ...@@ -4,7 +4,7 @@ WORKDIR /app
COPY package.json . COPY package.json .
RUN yarn install RUN yarn install
COPY . . COPY . .
RUN yarn build RUN yarn build && yarn --production
# And then copy over node_modules, etc from that stage to the smaller base image # And then copy over node_modules, etc from that stage to the smaller base image
FROM mhart/alpine-node:base FROM mhart/alpine-node:base
......
...@@ -11,5 +11,8 @@ ...@@ -11,5 +11,8 @@
"react": "16.2.0", "react": "16.2.0",
"react-dom": "16.2.0" "react-dom": "16.2.0"
}, },
"devDependencies": {
"isomorphic-unfetch": "^3.0.0"
},
"license": "ISC" "license": "ISC"
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment