chore: speedup devcontainer start (#19406)

This commit is contained in:
Min Idzelis
2025-06-24 05:59:52 -04:00
committed by GitHub
parent 9ca31abae9
commit c1b82bed9b
5 changed files with 20 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ ENTRYPOINT ["tini", "--", "/bin/sh"]
FROM dev AS dev-container-server
RUN rm -rf /usr/src/app
RUN apt-get update && \
apt-get install sudo inetutils-ping openjdk-11-jre-headless \
vim nano \
@@ -27,12 +28,16 @@ RUN usermod -aG sudo node
RUN echo "node ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN mkdir -p /workspaces/immich
RUN chown node -R /workspaces
COPY --chown=node:node --chmod=777 ../.devcontainer/server/*.sh /immich-devcontainer/
USER node
COPY --chown=node:node .. /tmp/create-dep-cache/
WORKDIR /tmp/create-dep-cache
RUN make ci-all && rm -rf /tmp/create-dep-cache
RUN mkdir /immich-devcontainer && chown node -R /immich-devcontainer
COPY --chmod=777 ../.devcontainer/server/*.sh /immich-devcontainer/
FROM dev-container-server AS dev-container-mobile
USER root
# Enable multiarch for arm64 if necessary
RUN if [ "$(dpkg --print-architecture)" = "arm64" ]; then \
dpkg --add-architecture amd64 && \