Skip to content

Commit 5cb936f

Browse files
wolfi-base also used in builder
1 parent 1756940 commit 5cb936f

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

Dockerfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
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
24

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
610

711
WORKDIR /opt
812
RUN git clone https://github.com/factor/factor.git && \
913
cd factor && \
10-
git checkout cd14ceed53f6f9a43bbd3aec3950d8beb5439ed8
14+
git checkout a56e6390e81340be6573cb790311c0a980a5f369
1115
WORKDIR /opt/factor
1216
RUN ./build.sh update
1317

@@ -85,11 +89,11 @@ RUN cd basis/io/encodings && rm -rf \
8589
RUN find . -name '*-docs.factor' -delete
8690

8791

88-
FROM cgr.dev/chainguard/wolfi-base
92+
FROM ${WOLFI_BASE}
8993

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
9397
RUN apk add --no-cache bash coreutils gawk jq libstdc++
9498

9599
COPY --from=builder /opt/factor /opt/factor

0 commit comments

Comments
 (0)