cpp-build-env-alpine
Dockerfile for cpp development.
5.3K
A lightweight Alpine-based Docker image for C/C++ development, debugging, and CI builds, with vcpkg preinstalled.
Image: rayyounghong/cpp-build-env-alpine — built nightly for linux/amd64 and linux/arm64.
alpine:latest (small footprint, musl libc).gcc, g++, build-base) and Clang (clang, lldb).make, ninja, cmake, autoconf, automake, libtool.gdb, lldb, strace, valgrind./home/builder/vcpkg, on PATH, with VCPKG_ROOT set. Bootstrapped with metrics disabled and VCPKG_FORCE_SYSTEM_BINARIES=1 (required on Alpine/musl).git, curl, tar, zip, unzip, rsync, dos2unix, bash.tzdata + musl-locales, configured to en_US.UTF-8 / Etc/UTC.builder (uid from adduser -D) with /workspace as the working directory.linux/amd64 and linux/arm64.Pull the image:
docker pull rayyounghong/cpp-build-env-alpine:latest
Drop into a shell with your project mounted at /workspace:
docker run --rm -it -v "$PWD":/workspace rayyounghong/cpp-build-env-alpine:latest bash
Use it as a CI build environment, e.g. in GitHub Actions:
jobs:
build:
runs-on: ubuntu-latest
container: rayyounghong/cpp-build-env-alpine:latest
steps:
- uses: actions/checkout@v4
- run: cmake -S . -B build -G Ninja
- run: cmake --build build
Install dependencies with vcpkg (manifest mode):
vcpkg install
VCPKG_FORCE_SYSTEM_BINARIES=1 (already set in the image) because vcpkg's prebuilt tool binaries are not musl-compatible.alpine:latest, so latest follows upstream Alpine and vcpkg HEAD. Pin by digest if you need reproducible builds.Content type
Image
Digest
sha256:5a743e21b…
Size
463.5 MB
Last updated
about 1 hour ago
docker pull rayyounghong/cpp-build-env-alpine