Skip to content

Commit

Permalink
feat(immich-server) use ubuntu base-image (immich-app#851)
Browse files Browse the repository at this point in the history
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 immich-app/immich-charts#4

Signed-off-by: PixelJonas <[email protected]>

Signed-off-by: PixelJonas <[email protected]>
  • Loading branch information
PixelJonas authored Oct 24, 2022
1 parent a87c1c1 commit f1af17b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions server/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
upload/
dist/
coverage/
.reverse-geocoding-dump
25 changes: 19 additions & 6 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
# Build stage
FROM node:16-alpine3.14 as builder
FROM node:16-slim 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 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-alpine3.14
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 \
&& apk add --no-cache libheif vips ffmpeg
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
Expand Down

0 comments on commit f1af17b

Please sign in to comment.