mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
chore: reduce docker image size (#1523)
* chore: remove @tensorflow/tfjs-node-gpu as it is unused * chore: remove ffmpeg from machine-learning docker image * chore: remove unneeded dependencies + move dev dependencies in server * chore: reduce server image size * chore: machine-learning remove extraneous dependencies * chore: web remove extraneous dependencies * chore: web Dockerfile reduce production image size * chore: add exiftool-vendored.pl as a dependency
This commit is contained in:
@@ -2,7 +2,7 @@ FROM node:16-alpine3.14 as builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk add --update-cache build-base python3 libheif vips-dev ffmpeg exiftool perl
|
||||
RUN apk add --update-cache build-base python3 libheif vips-dev ffmpeg perl
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
@@ -14,14 +14,14 @@ COPY . .
|
||||
FROM builder as prod
|
||||
|
||||
RUN npm run build
|
||||
RUN npm prune --omit=dev
|
||||
RUN npm prune --omit=dev --omit=optional
|
||||
|
||||
|
||||
FROM node:16-alpine3.14
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk add --no-cache libheif vips ffmpeg exiftool perl
|
||||
RUN apk add --no-cache libheif vips ffmpeg perl
|
||||
|
||||
COPY --from=prod /usr/src/app/node_modules ./node_modules
|
||||
COPY --from=prod /usr/src/app/dist ./dist
|
||||
@@ -32,7 +32,7 @@ COPY LICENSE /LICENSE
|
||||
COPY package.json package-lock.json ./
|
||||
COPY start-server.sh start-microservices.sh ./
|
||||
|
||||
RUN npm link
|
||||
RUN npm link && npm cache clean --force
|
||||
|
||||
VOLUME /usr/src/app/upload
|
||||
|
||||
|
||||
Reference in New Issue
Block a user