mirror of
https://github.com/immich-app/immich.git
synced 2024-11-28 09:33:27 +02:00
chore(server) revert Dockerfile (#878)
This commit is contained in:
parent
b3a82b1b20
commit
676ad2d34f
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# Build stage
|
# Build stage
|
||||||
FROM node:16-bullseye-slim as builder
|
FROM node:16-bullseye-slim as builder
|
||||||
|
|
||||||
@ -7,9 +8,8 @@ WORKDIR /usr/src/app
|
|||||||
|
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
|
|
||||||
RUN apt-get update > /dev/null \
|
RUN apt-get update
|
||||||
&& apt-get install --no-install-recommends -y gcc g++ make cmake python3 python3-pip ffmpeg > /dev/null \
|
RUN apt-get install gcc g++ make cmake python3 python3-pip ffmpeg -y
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
RUN npm rebuild @tensorflow/tfjs-node --build-from-source
|
RUN npm rebuild @tensorflow/tfjs-node --build-from-source
|
||||||
@ -24,9 +24,6 @@ FROM node:16-bullseye-slim
|
|||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
COPY LICENSE /licenses/LICENSE.txt
|
|
||||||
COPY LICENSE /LICENSE
|
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
@ -34,18 +31,13 @@ COPY entrypoint.sh ./
|
|||||||
|
|
||||||
RUN mkdir -p /usr/src/app/dist \
|
RUN mkdir -p /usr/src/app/dist \
|
||||||
&& mkdir -p /usr/src/app/node_modules \
|
&& mkdir -p /usr/src/app/node_modules \
|
||||||
&& mkdir -p /usr/src/app/.reverse-geocoding-dump \
|
&& apt-get update \
|
||||||
&& apt-get update > /dev/null \
|
&& apt-get install -y ffmpeg \
|
||||||
&& apt-get install --no-install-recommends -y ffmpeg > /dev/null \
|
&& rm -rf /var/cache/apt/lists
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/cache/apt/lists/*
|
|
||||||
|
|
||||||
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
||||||
COPY --from=builder /usr/src/app/dist ./dist
|
COPY --from=builder /usr/src/app/dist ./dist
|
||||||
|
|
||||||
RUN npm prune --production
|
RUN npm prune --production
|
||||||
|
|
||||||
RUN chown -R node:0 /usr/src/app \
|
# CMD [ "node", "dist/main" ]
|
||||||
&& chmod -R g=u /usr/src/app
|
|
||||||
|
|
||||||
RUN addgroup node root
|
|
@ -22,7 +22,6 @@ COPY package.json package-lock.json ./
|
|||||||
COPY start-server.sh start-microservices.sh ./
|
COPY start-server.sh start-microservices.sh ./
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/app/dist \
|
RUN mkdir -p /usr/src/app/dist \
|
||||||
&& mkdir /usr/src/app/.reverse-geocoding-dump \
|
|
||||||
&& apk add --no-cache libheif vips ffmpeg
|
&& apk add --no-cache libheif vips ffmpeg
|
||||||
|
|
||||||
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
COPY --from=builder /usr/src/app/node_modules ./node_modules
|
||||||
@ -30,11 +29,6 @@ COPY --from=builder /usr/src/app/dist ./dist
|
|||||||
|
|
||||||
RUN npm prune --production
|
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
|
VOLUME /usr/src/app/upload
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
@ -6,8 +6,9 @@ COPY LICENSE /LICENSE
|
|||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
RUN chown node:node /usr/src/app && \
|
RUN chown node:node /usr/src/app
|
||||||
apk add --no-cache setpriv
|
|
||||||
|
RUN apk add --no-cache setpriv
|
||||||
|
|
||||||
COPY --chown=node:node package*.json ./
|
COPY --chown=node:node package*.json ./
|
||||||
|
|
||||||
@ -15,11 +16,7 @@ RUN npm ci
|
|||||||
|
|
||||||
COPY --chown=node:node . .
|
COPY --chown=node:node . .
|
||||||
|
|
||||||
RUN npm run build \
|
RUN npm run build
|
||||||
&& chown -R node:0 /usr/src/app \
|
|
||||||
&& chmod -R g=u /usr/src/app
|
|
||||||
|
|
||||||
RUN addgroup node root
|
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user