From 330648ff440054c36c69ea2cfdfbc46ab84ba29c Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Tue, 25 Jun 2024 07:12:27 -0400 Subject: [PATCH] chore(deps): use full semver docker tag for node images (#10613) * chore: use full semver docker tag for node images * Update server/Dockerfile Co-authored-by: bo0tzz --------- Co-authored-by: bo0tzz --- cli/Dockerfile | 4 ++-- server/Dockerfile | 20 ++++++++++---------- web/Dockerfile | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cli/Dockerfile b/cli/Dockerfile index ff7069f3df..95a8ebc428 100644 --- a/cli/Dockerfile +++ b/cli/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine3.19@sha256:eb17a0816c6475000def8bf0dd0a85bc59340235eb9fbb0aff158b4c9a3c7d6f as core +FROM node:20.15.0-alpine3.19 as core WORKDIR /usr/src/open-api/typescript-sdk COPY open-api/typescript-sdk/package*.json open-api/typescript-sdk/tsconfig*.json ./ @@ -16,4 +16,4 @@ RUN npm run build WORKDIR /import -ENTRYPOINT ["node", "/usr/src/app/dist"] \ No newline at end of file +ENTRYPOINT ["node", "/usr/src/app/dist"] diff --git a/server/Dockerfile b/server/Dockerfile index 0363b0ce6e..8587c269a2 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -5,15 +5,15 @@ RUN apt-get install --no-install-recommends -yqq tini WORKDIR /usr/src/app COPY server/package.json server/package-lock.json ./ RUN npm ci && \ - # exiftool-vendored.pl, sharp-linux-x64 and sharp-linux-arm64 are the only ones we need - # they're marked as optional dependencies, so we need to copy them manually after pruning - rm -rf node_modules/@img/sharp-libvips* && \ - rm -rf node_modules/@img/sharp-linuxmusl-x64 + # exiftool-vendored.pl, sharp-linux-x64 and sharp-linux-arm64 are the only ones we need + # they're marked as optional dependencies, so we need to copy them manually after pruning + rm -rf node_modules/@img/sharp-libvips* && \ + rm -rf node_modules/@img/sharp-linuxmusl-x64 COPY server . ENV PATH="${PATH}:/usr/src/app/bin" \ - IMMICH_ENV=development \ - NVIDIA_DRIVER_CAPABILITIES=all \ - NVIDIA_VISIBLE_DEVICES=all + IMMICH_ENV=development \ + NVIDIA_DRIVER_CAPABILITIES=all \ + NVIDIA_VISIBLE_DEVICES=all ENTRYPOINT ["tini", "--", "/bin/sh"] @@ -25,7 +25,7 @@ COPY --from=dev /usr/src/app/node_modules/@img ./node_modules/@img COPY --from=dev /usr/src/app/node_modules/exiftool-vendored.pl ./node_modules/exiftool-vendored.pl # web build -FROM node:iron-alpine3.18@sha256:53108f67824964a573ea435fed258f6cee4d88343e9859a99d356883e71b490c as web +FROM node:20.13.1-alpine3.18 as web WORKDIR /usr/src/open-api/typescript-sdk COPY open-api/typescript-sdk/package*.json open-api/typescript-sdk/tsconfig*.json ./ @@ -45,8 +45,8 @@ FROM ghcr.io/immich-app/base-server-prod:20240618@sha256:7b527902e75c47c23bc9822 WORKDIR /usr/src/app ENV NODE_ENV=production \ - NVIDIA_DRIVER_CAPABILITIES=all \ - NVIDIA_VISIBLE_DEVICES=all + NVIDIA_DRIVER_CAPABILITIES=all \ + NVIDIA_VISIBLE_DEVICES=all COPY --from=prod /usr/src/app/node_modules ./node_modules COPY --from=prod /usr/src/app/dist ./dist COPY --from=prod /usr/src/app/bin ./bin diff --git a/web/Dockerfile b/web/Dockerfile index f28a5f883d..29a2471bbc 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,4 +1,4 @@ -FROM node:iron-alpine3.18@sha256:53108f67824964a573ea435fed258f6cee4d88343e9859a99d356883e71b490c +FROM node:20.13.1-alpine3.18 RUN apk add --no-cache tini USER node