1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-26 10:50:29 +02:00
immich/server/Dockerfile
Jonas Janz f1af17bf4d
feat(immich-server) use ubuntu base-image (#851)
this changes the base-image for immich-server from
`node:16-alpine3.14`
to
`node:16-slim`

There is an open issue with alpine DNS resolving which
breaks immich-microservice when deployed on
kubernetes.

This fixes https://github.com/immich-app/immich-charts/issues/4

Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com>

Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com>
2022-10-24 14:59:07 -05:00

48 lines
1021 B
Docker

# Build stage
FROM node:16-slim as builder
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
python3 \
libheif-dev \
libvips-dev \
ffmpeg && \
apt-get -y clean && apt-get autoremove -y && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
RUN npm ci
COPY . .
RUN npm run build
# Prod stage
FROM node:16-slim
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
COPY start-server.sh start-microservices.sh ./
RUN mkdir -p /usr/src/app/dist
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libheif-dev \
libvips-dev \
ffmpeg && \
apt-get -y clean && apt-get autoremove -y && apt-get purge -y --auto-remove && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/app/node_modules ./node_modules
COPY --from=builder /usr/src/app/dist ./dist
RUN npm prune --production
VOLUME /usr/src/app/upload
EXPOSE 3001