Last changed
docker pull cgr.dev/chainguard/gcc-glibc
Need access to a specific version? Contact us.
Get notified of upcoming product changes, critical vulnerability notifications and patches and more.
Sign InMinimal container image for building C applications (which require glibc).
The image is available on cgr.dev
:
To build the C application in examples/hello/main.c:
This will write a Linux binary to ./hello
. If you're on Linux and have the glibc library, you
should be able to run it directly. Otherwise you can run it in a container e.g:
Note: only linux/amd64
is uspported at the moment.
We can also do this all in a multi-stage Dockerfile e.g:
And we can also compile statically to be used in environments without glibc:
Chainguard Images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" version of this image:
BSD-2-Clause
GCC-exception-3.1
GPL-2.0-only
GPL-2.0-or-later
GPL-3.0-or-later
ISC
LGPL-2.1-or-later
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreement