1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-26 10:50:29 +02:00
immich/server/Dockerfile
martin 70a0f4ae48
chore: update to node 18 and alpine 3.17 (#2430)
* chore: update to node 18 and alpine 3.17

Signed-off-by: martin <martin.labat92@gmail.com>

* chore: fix sharp version

Signed-off-by: martin <martin.labat92@gmail.com>

* chore(server): use vips-dev

Signed-off-by: martin <martin.labat92@gmail.com>

* update checkDiskUsage

Signed-off-by: martin <martin.labat92@gmail.com>

* fix: use vips-heif instead of libheif

Signed-off-by: martin <martin.labat92@gmail.com>

* fix: use vips instead of vips-cpp

Signed-off-by: martin <martin.labat92@gmail.com>

* fix: ensure vips installation

Signed-off-by: martin <martin.labat92@gmail.com>

---------

Signed-off-by: martin <martin.labat92@gmail.com>
2023-05-18 10:56:33 -05:00

42 lines
780 B
Docker

FROM node:18-alpine3.17 as builder
WORKDIR /usr/src/app
RUN apk add --update-cache build-base python3 vips-heif vips-dev ffmpeg perl
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
FROM builder as prod
RUN npm run build
RUN npm prune --omit=dev --omit=optional
FROM node:18-alpine3.17
ENV NODE_ENV=production
WORKDIR /usr/src/app
RUN apk add --no-cache vips-heif vips vips-cpp ffmpeg perl
COPY --from=prod /usr/src/app/node_modules ./node_modules
COPY --from=prod /usr/src/app/dist ./dist
COPY --from=prod /usr/src/app/bin ./bin
COPY LICENSE /licenses/LICENSE.txt
COPY LICENSE /LICENSE
COPY package.json package-lock.json ./
COPY start-server.sh start-microservices.sh ./
RUN npm link && npm cache clean --force
VOLUME /usr/src/app/upload
EXPOSE 3001