immich/server/Dockerfile

40 lines
689 B
Docker
Raw Normal View History

FROM node:16-alpine3.14 as builder
WORKDIR /usr/src/app
RUN apk add --update-cache build-base python3 libheif vips-dev ffmpeg
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
2022-11-10 21:22:17 -07:00
FROM builder as prod
RUN npm run build
2022-11-10 21:22:17 -07:00
RUN npm prune --omit=dev
FROM node:16-alpine3.14
WORKDIR /usr/src/app
RUN apk add --no-cache libheif vips ffmpeg
2022-11-10 21:22:17 -07: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 ./
2022-12-09 13:52:56 -07:00
RUN npm link
VOLUME /usr/src/app/upload
EXPOSE 3001