Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (43 loc) · 2.02 KB
/
Copy pathDockerfile
File metadata and controls
51 lines (43 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM debian:bookworm-slim@sha256:99c0b25c46d0214d5a2091092e7908907dcaecd6a962cde0ac700acee222b6f3 AS download
ARG FALLOW_VERSION=3.40.0
ARG TARGETARCH
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
# The sha256 pins below are bound to FALLOW_VERSION above; bump both together.
# The maintainer release flow refreshes all three after publication, via
# .github/scripts/update-dockerfile-pins.mjs. There is no CI job that does it:
# the docker-lockstep job that used to open a PR here was removed in v3.7.1.
RUN set -eux; \
case "${TARGETARCH}" in \
amd64) \
asset="fallow-linux-x64-musl"; \
sha256="cd84bd5ab8f2fdeec98a413f9e612b8129151f66431f1f8862fbddd4409de7d7"; \
;; \
arm64) \
asset="fallow-linux-arm64-musl"; \
sha256="caf3345212174d0f3610701afda4029eabfb8dff54765d7cae0e2ed0c461225e"; \
;; \
*) \
echo "unsupported TARGETARCH: ${TARGETARCH}" >&2; \
exit 1; \
;; \
esac; \
curl -fsSL --retry 5 --retry-connrefused --retry-delay 2 \
"https://github.com/fallow-rs/fallow/releases/download/v${FALLOW_VERSION}/${asset}" -o /usr/local/bin/fallow; \
echo "${sha256} /usr/local/bin/fallow" | sha256sum -c -; \
chmod +x /usr/local/bin/fallow
FROM node:26-bookworm-slim@sha256:1e96b01216cab31612cd1f9480e83413472dee8686d423cb4c1ec62bf8a26e9e AS runtime
# tools/corepack/package-lock.json pins the corepack version and its hash.
COPY tools/corepack/package.json tools/corepack/package-lock.json /opt/corepack/
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates git \
&& npm ci --prefix /opt/corepack --ignore-scripts --no-audit --no-fund \
&& ln -sf /opt/corepack/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack \
&& corepack enable --install-directory /usr/local/bin \
&& npm cache clean --force \
&& rm -rf /var/lib/apt/lists/*
COPY --from=download /usr/local/bin/fallow /usr/local/bin/fallow
WORKDIR /workspace
ENTRYPOINT ["fallow"]
CMD ["--help"]