mirror of
https://github.com/immich-app/immich.git
synced 2024-11-16 02:18:50 -07:00
43da8c2a72
* 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
35 lines
644 B
Docker
35 lines
644 B
Docker
FROM node:16-bullseye-slim as builder
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install gcc g++ make cmake python3 python3-pip -y
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN npm ci
|
|
RUN npm rebuild @tensorflow/tfjs-node --build-from-source
|
|
|
|
COPY . .
|
|
|
|
FROM builder as prod
|
|
|
|
RUN npm run build
|
|
RUN npm prune --omit=dev
|
|
|
|
FROM node:16-bullseye-slim
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY --from=prod /usr/src/app/node_modules ./node_modules
|
|
COPY --from=prod /usr/src/app/dist ./dist
|
|
|
|
COPY package.json package-lock.json ./
|
|
COPY entrypoint.sh ./
|
|
|
|
# CMD [ "node", "dist/main" ]
|