Skip to content

Commit a083cd8

Browse files
committed
chore(build): bump Docker images
1 parent a6c2121 commit a083cd8

3 files changed

Lines changed: 21 additions & 14 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.93-slim-trixie@sha256:c0a38f5662afdb298898da1d70b909af4bda4e0acff2dc52aea6360a9b9c6956 AS builder
1+
FROM rust:1.95-slim-trixie@sha256:a6ed0cbc27f063c367aee8373f35fdf4dcf8be7596c4d19d6643e3252e514c2e AS builder
22
WORKDIR /app
33

44
ARG TARGETARCH
@@ -20,7 +20,7 @@ RUN --mount=type=cache,target=/app/target cargo build --release && \
2020
upx --best --lzma ./retrack
2121

2222
# Check out https://gcr.io/distroless/cc-debian13:nonroot
23-
FROM gcr.io/distroless/cc-debian13:nonroot@sha256:9c4fe2381c2e6d53c4cfdefeff6edbd2a67ec7713e2c3ca6653806cbdbf27a1e
23+
FROM gcr.io/distroless/cc-debian13:nonroot@sha256:8f960b7fc6a5d6e28bb07f982655925d6206678bd9a6cde2ad00ddb5e2077d78
2424
EXPOSE 7676
2525

2626
WORKDIR /app

Dockerfile.web-scraper

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM node:22-slim@sha256:80fdb3f57c815e1b638d221f30a826823467c4a56c8f6a8d7aa091cd9b1675ea AS builder
1+
FROM --platform=$BUILDPLATFORM node:24-slim@sha256:f96cade014243001e5c18f1befaf0bf44564f7cf358287ef691114dcb04b173b AS builder
22
WORKDIR /app
33

44
# Copy workspace root `package.json` and `package-lock.json` files,
@@ -12,7 +12,7 @@ COPY ["./components/retrack-web-scraper", "./components/retrack-web-scraper"]
1212
RUN set -x && npm test --ws
1313
RUN set -x && npm run build --ws
1414

15-
FROM node:22-slim@sha256:80fdb3f57c815e1b638d221f30a826823467c4a56c8f6a8d7aa091cd9b1675ea
15+
FROM node:24-slim@sha256:f96cade014243001e5c18f1befaf0bf44564f7cf358287ef691114dcb04b173b
1616
ENV NODE_ENV=production \
1717
PLAYWRIGHT_BROWSERS_PATH=/ms-playwright \
1818
RETRACK_WEB_SCRAPER_BROWSER_CHROMIUM_EXECUTABLE_PATH=/usr/local/bin/chromium
@@ -34,14 +34,21 @@ RUN set -x && apt-get update && \
3434
COPY ./dev/docker/chromium_local.conf /etc/fonts/local.conf
3535
RUN set -x && fc-cache -fv
3636

37-
COPY --from=builder ["/app/components/retrack-web-scraper/dist/", "./"]
38-
COPY --from=builder ["/app/components/retrack-web-scraper/package.json", "/app/package-lock.json", "./"]
37+
# Preserve the workspace layout (root + leaf package.json + workspace lock
38+
# file) so `npm ci` can resolve the web-scraper's deps via its workspace entry.
39+
# Flattening these files into /app fails with npm >= 11 because the workspace
40+
# lockfile records dependencies under `packages."components/retrack-web-scraper"`,
41+
# not under the top-level `packages.""` key.
42+
COPY --from=builder ["/app/package.json", "/app/package-lock.json", "./"]
43+
COPY --from=builder ["/app/components/retrack-web-scraper/package.json", "./components/retrack-web-scraper/"]
44+
COPY --from=builder ["/app/components/retrack-web-scraper/dist/", "./components/retrack-web-scraper/"]
3945

40-
# Install production dependencies, then use Playwright to install only the
41-
# Chromium binary (no --with-deps). Create a stable symlink so the app can
42-
# find the binary regardless of the Playwright revision number.
43-
# Post-install cleanup: remove headless-shell, ffmpeg, all but en-US locale.
44-
RUN set -x && npm ci --production && \
46+
# Install production dependencies for the web-scraper workspace only, then use
47+
# Playwright to install only the Chromium binary (no --with-deps). Create a
48+
# stable symlink so the app can find the binary regardless of the Playwright
49+
# revision number. Post-install cleanup: remove headless-shell, ffmpeg, all but
50+
# en-US locale.
51+
RUN set -x && npm ci --omit=dev --workspace=retrack-web-scraper --include-workspace-root=false && \
4552
npx playwright install chromium && \
4653
rm -rf /ms-playwright/chromium_headless_shell-* && \
4754
rm -rf /ms-playwright/ffmpeg-* && \
@@ -56,5 +63,5 @@ RUN set -x && npm ci --production && \
5663
USER node
5764

5865
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
59-
CMD ["node", "src/index.js"]
66+
CMD ["node", "components/retrack-web-scraper/src/index.js"]
6067

Dockerfile.web-scraper-camoufox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.14-slim-trixie@sha256:fb83750094b46fd6b8adaa80f66e2302ecbe45d513f6cece637a841e1025b4ca
1+
FROM python:3.14-slim-trixie@sha256:aee3b1c52ce756c42ee4ad90437ae49d87fa87fc2f09c17895f098b67f081a8d
22
EXPOSE 7777
33

44
ENV CAMOUFOX_PORT=7777
@@ -19,7 +19,7 @@ RUN set -x \
1919
# Layer 2: Camoufox install + patch + fetch
2020
RUN set -x \
2121
&& pip install cloverlabs-camoufox==0.5.5 \
22-
&& pip install "git+https://github.com/microsoft/playwright-python.git@release-1.58" \
22+
&& pip install "git+https://github.com/microsoft/playwright-python.git@release-1.59" \
2323
&& sed -i 's/fontconfigs/fontconfig/g' /usr/local/lib/python3.14/site-packages/camoufox/utils.py \
2424
&& python -m camoufox sync \
2525
&& echo y | python -m camoufox fetch official/146.0.1-alpha.25

0 commit comments

Comments
 (0)