C development environment with GCC on Alpine Linux
10K+
C development environment with GCC on Alpine Linux
Source code is available on GitHub
docker pull pman0214/alpine-gcc
Default WORKDIR is /app.
docker run --rm -v $PWD:/app pman0214/alpine-gcc gcc -Wall -o hoge hoge.c
docker run --rm -v $PWD:/app pman0214/alpine-gcc ./hoge
You can all combine compile and run commands.
docker run --rm -v $PWD:/app pman0214/alpine-gcc sh -c "gcc -Wall -o hoge hoge.c && ./hoge"
If you want to build this image by yourself, please prepare for a multi-architecture builder referring to the official documents.
docker run --privileged --rm tonistiigi/binfmt --uninstall "qemu-*"
docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --name multiarch --driver docker-container
docker buildx use multiarch
docker buildx inspect --bootstrap
In this example, multiarch is the name of the multi-architecture builder.
You can build this image with your own multi-architecture builder.
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
-t "alpine-gcc" \
. --load
--push option instead of --load with appropriate tag pushes built images to GitHub.
All the source files are released under the MIT license. See LICENSE.txt.
Content type
Image
Digest
sha256:f27cd6a30…
Size
85.8 MB
Last updated
about 1 year ago
docker pull pman0214/alpine-gcc