1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

🐳️ 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`
This commit is contained in:
Jerome Fitzgerald 2018-10-18 18:36:04 -04:00 committed by Tim Neutkens
parent 9634bad79d
commit 6eba3ad9ab
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -11,5 +11,8 @@
"react": "16.2.0",
"react-dom": "16.2.0"
},
"devDependencies": {
"isomorphic-unfetch": "^3.0.0"
},
"license": "ISC"
}