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