mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +02:00
b713fb5650
* feat(docker) revert ubuntu base image This PR reverts the base image for immich-server back to alpine Adds LICENSE to all Images Quiets apt-get commands when building ensures write-permission for root group on app folders Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com> * Test build old Docker content * Revert and retry Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
41 lines
810 B
Docker
41 lines
810 B
Docker
FROM node:16-alpine3.14 as builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN apk add --update-cache build-base python3 libheif vips-dev ffmpeg
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
# Prod stage
|
|
FROM node:16-alpine3.14
|
|
|
|
WORKDIR /usr/src/app
|
|
COPY LICENSE /licenses/LICENSE.txt
|
|
COPY LICENSE /LICENSE
|
|
|
|
COPY package.json package-lock.json ./
|
|
COPY start-server.sh start-microservices.sh ./
|
|
|
|
RUN mkdir -p /usr/src/app/dist \
|
|
&& mkdir /usr/src/app/.reverse-geocoding-dump \
|
|
&& apk add --no-cache libheif vips ffmpeg
|
|
|
|
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
|
COPY --from=builder /usr/src/app/dist ./dist
|
|
|
|
RUN npm prune --production
|
|
|
|
RUN chown -R node:0 /usr/src/app \
|
|
&& chmod -R g=u /usr/src/app
|
|
|
|
RUN addgroup node root
|
|
|
|
VOLUME /usr/src/app/upload
|
|
|
|
EXPOSE 3001
|