Skip to content

High performance self-hosted photo and video management solution.

chore(server) revert Dockerfile (#878)

Alex676ad2d34f9e
diff --git a/machine-learning/Dockerfile b/machine-learning/Dockerfile
index b69b501efc..b19813c234 100644
--- a/machine-learning/Dockerfile
+++ b/machine-learning/Dockerfile
@@ -1,3 +1,4 @@
+
# Build stage
FROM node:16-bullseye-slim as builder
@@ -7,9 +8,8 @@ WORKDIR /usr/src/app
COPY package.json package-lock.json ./
-RUN apt-get update > /dev/null \
- && apt-get install --no-install-recommends -y gcc g++ make cmake python3 python3-pip ffmpeg > /dev/null \
- && apt-get clean && rm -rf /var/lib/apt/lists/*
+RUN apt-get update
+RUN apt-get install gcc g++ make cmake python3 python3-pip ffmpeg -y
RUN npm ci
RUN npm rebuild @tensorflow/tfjs-node --build-from-source
@@ -24,9 +24,6 @@ FROM node:16-bullseye-slim
ARG DEBIAN_FRONTEND=noninteractive
-COPY LICENSE /licenses/LICENSE.txt
-COPY LICENSE /LICENSE
-
WORKDIR /usr/src/app
COPY package.json package-lock.json ./
@@ -34,18 +31,13 @@ COPY entrypoint.sh ./
RUN mkdir -p /usr/src/app/dist \
&& mkdir -p /usr/src/app/node_modules \
- && mkdir -p /usr/src/app/.reverse-geocoding-dump \
- && apt-get update > /dev/null \
- && apt-get install --no-install-recommends -y ffmpeg > /dev/null \
- && apt-get clean \
- && rm -rf /var/cache/apt/lists/*
+ && apt-get update \
+ && apt-get install -y ffmpeg \
+ && rm -rf /var/cache/apt/lists
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
\ No newline at end of file
+# CMD [ "node", "dist/main" ]
\ No newline at end of file
diff --git a/server/Dockerfile b/server/Dockerfile
index ccad886a5d..2e9e287922 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -22,7 +22,6 @@ 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
@@ -30,11 +29,6 @@ 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
+EXPOSE 3001
\ No newline at end of file
diff --git a/web/Dockerfile b/web/Dockerfile
index af35b489fc..8289a30f6d 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -6,8 +6,9 @@ COPY LICENSE /LICENSE
WORKDIR /usr/src/app
-RUN chown node:node /usr/src/app && \
- apk add --no-cache setpriv
+RUN chown node:node /usr/src/app
+
+RUN apk add --no-cache setpriv
COPY --chown=node:node package*.json ./
@@ -15,11 +16,7 @@ RUN npm ci
COPY --chown=node:node . .
-RUN npm run build \
- && chown -R node:0 /usr/src/app \
- && chmod -R g=u /usr/src/app
-
-RUN addgroup node root
+RUN npm run build
EXPOSE 3000