27 lines
726 B
Docker
27 lines
726 B
Docker
# Mirrors the Alpine CI environment for portable (musl static) builds.
|
|
# - Alpine 3.21 with musl libc
|
|
# - GCC + static zlib for fully static binaries
|
|
# - Produces portable Linux binaries that run on any distro
|
|
#
|
|
# Build: docker build -f test-infrastructure/Dockerfile.alpine -t cbm-alpine test-infrastructure/
|
|
# Run: docker run --rm -v $(pwd):/src cbm-alpine
|
|
|
|
FROM alpine:3.21@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
|
|
|
|
RUN apk add --no-cache \
|
|
build-base \
|
|
linux-headers \
|
|
zlib-dev \
|
|
zlib-static \
|
|
bash \
|
|
git \
|
|
python3 \
|
|
nodejs \
|
|
npm \
|
|
ca-certificates
|
|
|
|
WORKDIR /src
|
|
|
|
ENTRYPOINT ["bash", "scripts/build.sh"]
|
|
CMD ["CC=gcc", "CXX=g++", "STATIC=1"]
|