1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00
immich/server/Dockerfile

34 lines
678 B
Docker
Raw Normal View History

FROM ghcr.io/immich-app/base-server-dev:20231109 as builder
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
2022-11-11 06:22:17 +02:00
FROM builder as prod
RUN npm run build
RUN npm prune --omit=dev --omit=optional
2022-11-11 06:22:17 +02:00
FROM ghcr.io/immich-app/base-server-prod:20231109
ENV NODE_ENV=production
2022-11-11 06:22:17 +02:00
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 ./assets ./assets
COPY LICENSE /licenses/LICENSE.txt
COPY LICENSE /LICENSE
COPY package.json package-lock.json ./
COPY start*.sh ./
RUN npm link && npm cache clean --force
VOLUME /usr/src/app/upload
EXPOSE 3001
ENTRYPOINT ["tini", "--", "/bin/sh"]