mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(docker) revert ubuntu base image (#863)
* 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>
This commit is contained in:
@@ -1,19 +1,10 @@
|
||||
# Build stage
|
||||
FROM node:16-slim as builder
|
||||
FROM node:16-alpine3.14 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 apk add --update-cache build-base python3 libheif vips-dev ffmpeg
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
@@ -21,27 +12,29 @@ COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Prod stage
|
||||
FROM node:16-slim
|
||||
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
|
||||
|
||||
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/*
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user