1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00
immich/server/Dockerfile

44 lines
804 B
Docker
Raw Normal View History

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 . .
2022-11-11 04:22:17 +00:00
FROM builder as prod
RUN npm run build
RUN npm prune --omit=dev --omit=optional
2022-11-11 04:22:17 +00:00
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
2022-11-11 04:22:17 +00: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 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
2022-12-09 20:52:56 +00:00
VOLUME /usr/src/app/upload
EXPOSE 3001
ENTRYPOINT ["/bin/sh"]