@@ -4,7 +4,12 @@ FROM ghcr.io/immich-app/base-server-dev:202507091427@sha256:733e510024e03bc24506
4
4
WORKDIR /usr/src/app
5
5
COPY ./server/package* ./server/
6
6
WORKDIR /usr/src/app/server
7
- RUN npm ci && \
7
+ RUN echo "umask 000" >> /etc/profile && \
8
+ echo "umask 000" >> /etc/bash.bashrc && \
9
+ umask 000 && \
10
+ chmod o+wx /usr/src/app && \
11
+ chmod o+wx /usr/src/app/server && \
12
+ npm ci && \
8
13
# exiftool-vendored.pl, sharp-linux-x64 and sharp-linux-arm64 are the only ones we need
9
14
# they're marked as optional dependencies, so we need to copy them manually after pruning
10
15
rm -rf node_modules/@img/sharp-libvips* && \
@@ -26,17 +31,14 @@ RUN apt-get update && \
26
31
RUN usermod -aG sudo node
27
32
RUN echo "node ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
28
33
RUN mkdir -p /workspaces/immich
29
- RUN chown node -R /workspaces
30
- COPY --chown=node:node --chmod=777 ../.devcontainer/server/*.sh /immich-devcontainer/
34
+ COPY --chmod=777 ../.devcontainer/server/*.sh /immich-devcontainer/
31
35
32
- USER node
33
- COPY --chown=node:node .. /tmp/create-dep-cache/
36
+ COPY .. /tmp/create-dep-cache/
34
37
WORKDIR /tmp/create-dep-cache
35
38
RUN make ci-all && rm -rf /tmp/create-dep-cache
36
39
37
-
38
40
FROM dev-container-server AS dev-container-mobile
39
- USER root
41
+
40
42
# Enable multiarch for arm64 if necessary
41
43
RUN if [ "$(dpkg --print-architecture)" = "arm64" ]; then \
42
44
dpkg --add-architecture amd64 && \
@@ -62,7 +64,6 @@ RUN mkdir -p ${FLUTTER_HOME} \
62
64
&& rm flutter.tar.xz \
63
65
&& chown -R node ${FLUTTER_HOME}
64
66
65
- USER node
66
67
RUN sudo apt-get update \
67
68
&& wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg \
68
69
&& echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list \
0 commit comments