mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
build: switch to multi-stage docker build to reduce size
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM node:12.18-alpine
|
FROM node:12.18-alpine AS BUILD_IMAGE
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -10,4 +10,14 @@ RUN yarn --frozen-lockfile && \
|
|||||||
RUN yarn install --production --ignore-scripts --prefer-offline
|
RUN yarn install --production --ignore-scripts --prefer-offline
|
||||||
RUN yarn cache clean
|
RUN yarn cache clean
|
||||||
|
|
||||||
|
FROM node:12.18-alpine
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# copy from build image
|
||||||
|
COPY --from=BUILD_IMAGE /app/dist ./dist
|
||||||
|
COPY --from=BUILD_IMAGE /app/.next ./.next
|
||||||
|
COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
|
||||||
|
|
||||||
CMD yarn start
|
CMD yarn start
|
||||||
|
Reference in New Issue
Block a user