This container image delivers a development snapshot of the GNU Compiler Collection (GCC) version 17. It provides an immediate environment for compiling projects written in C, C++, GO, Fortran, and other supported programming languages. This version is under active development and built from the latest source snapshot.
Built upon the foundation of the Sourcemation Debian 13 Slim image.
To initiate a container with GCC 17 and gain shell access:
docker run -it sourcemation/gcc-17 /bin/bash
For compiling your source code, you can link your project directory to the container:
docker run -v /path/to/your/project:/app -w /app sourcemation/gcc-17 gcc main.c -o main
Here, the -v option establishes a mount between your local directory and
/app within the container, while -w sets /app as the active working
directory.
You also have the option to construct a personalized Dockerfile extending this image:
FROM sourcemation/gcc-17
# Include your specific files
COPY . /app
WORKDIR /app
RUN gcc main.c -o main
CMD ["./main"]
Subsequently, build and execute your tailored image:
docker build -t my-gcc-app .
docker run -it my-gcc-app
This image, in its standard configuration, does not define any particular environment variables, expose any network ports, or necessitate persistent volumes. Nevertheless, you retain the flexibility to mount volumes for sharing your project files and build artifacts.
The following environment variables are defined within the image:
GCC_VERSION="20260802" # This may vary based on the precise snapshot version
GPG_KEYS="B215C1633BCA0477615F1B35A5B3A004745C015A (...)" # A collection of keys for verifying the GPG signature of the GCC tarball
Security considerations: The development snapshots do not provide cryptographic signatures, the GPG_KEYS is not used for checking the signature of the tarball.
Furthermore, this image employs dpkg-divert to rename the original gcc and
g++ executables. They are still present within the system.
/usr/bin/gcc.orig
/usr/bin/g++.orig
/usr/bin/gfortran.orig
We'd love for you to contribute! You can request new features, report bugs, or submit a pull request with your contribution to this image on the Sourcemation GitHub repository.
Disclaimer: The sourcemation/gcc-17 image is not affiliated with the GNU
Project. The respective companies and organisations own the trademarks
mentioned in the offering. The sourcemation/gcc-17 image is a separate
project and is maintained by Sourcemation.
Since 11 March 2026, all builds are forced to use --enable-checking=release.
This option performs internal consistency checks appropriate for a release version
of the compiler, balancing safety and performance. You can find more info
on the official GCC configuration page.
The GCC snapshot version was also updated to 20260802.
This GCC 17 development snapshot image is built on a Debian 13 Slim base image,
a minimal consistent compilation environment. This image is loosely
based on the Docker official image for gcc and is built using a separate,
independent Sourcemation images build chain.
A detailed risk analysis report of the images and their components can be found on the Sourcemation platform.
For more information about GCC, check out the official GCC website.
The base license for GCC is the GNU General Public License version 3 with GCC Runtime Library Exception.
Content type
Image
Digest
sha256:b54ee4c21…
Size
442 MB
Last updated
11 days ago
docker pull sourcemation/gcc-17