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:
parent
9634bad79d
commit
6eba3ad9ab
|
@ -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
|
||||
|
|
|
@ -11,5 +11,8 @@
|
|||
"react": "16.2.0",
|
||||
"react-dom": "16.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"isomorphic-unfetch": "^3.0.0"
|
||||
},
|
||||
"license": "ISC"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue