|
1 | | -FROM debian:bookworm-slim AS builder |
| 1 | +# To refresh, copy the Digest from |
| 2 | +# `docker buildx imagetools inspect cgr.dev/chainguard/wolfi-base:latest` |
| 3 | +ARG WOLFI_BASE=cgr.dev/chainguard/wolfi-base@sha256:3258be472764337fd13095bcbb3182da170243b5819fd67ad4c0754590588b31 |
2 | 4 |
|
3 | | -RUN apt-get update && apt-get install -y --no-install-recommends \ |
4 | | - bash curl git g++ make wget ca-certificates \ |
5 | | - && rm -rf /var/lib/apt/lists/* |
| 5 | +FROM ${WOLFI_BASE} AS builder |
| 6 | + |
| 7 | +# build-base bundles gcc/g++, make and glibc-dev (for the C++ side |
| 8 | +# of Factor's VM); the rest fetch + bootstrap the source tree. |
| 9 | +RUN apk add --no-cache bash build-base curl git wget |
6 | 10 |
|
7 | 11 | WORKDIR /opt |
8 | 12 | RUN git clone https://github.com/factor/factor.git && \ |
9 | 13 | cd factor && \ |
10 | | - git checkout cd14ceed53f6f9a43bbd3aec3950d8beb5439ed8 |
| 14 | + git checkout a56e6390e81340be6573cb790311c0a980a5f369 |
11 | 15 | WORKDIR /opt/factor |
12 | 16 | RUN ./build.sh update |
13 | 17 |
|
@@ -85,11 +89,11 @@ RUN cd basis/io/encodings && rm -rf \ |
85 | 89 | RUN find . -name '*-docs.factor' -delete |
86 | 90 |
|
87 | 91 |
|
88 | | -FROM cgr.dev/chainguard/wolfi-base |
| 92 | +FROM ${WOLFI_BASE} |
89 | 93 |
|
90 | | -# Wolfi is glibc-based, so the Factor binary built on Debian above runs |
91 | | -# without a compat shim. bash for run.sh; gawk + jq for the parser; |
92 | | -# coreutils for realpath / mktemp. |
| 94 | +# bash for run.sh |
| 95 | +# coreutils for realpath / mktemp |
| 96 | +# gawk + jq for the parser |
93 | 97 | RUN apk add --no-cache bash coreutils gawk jq libstdc++ |
94 | 98 |
|
95 | 99 | COPY --from=builder /opt/factor /opt/factor |
|
0 commit comments