Return to Image List

gcc

gcc

The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project that supports various programming languages. GCC is a key component of the GNU toolchain. The Free Software Foundation (FSF) distributes GCC under the GNU General Public License (GNU GPL). GCC has played an important role in the growth of free software, as both a tool and an example.

See gcc.gnu.org for more information

This image is built by IBM to run on the IBM Z architecture and is not affiliated with any other community that provides a version of this image.


License

View license information here

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.


Versions

Use the pull string below for the version of this image you require.
12.1.0-bullseye docker pull icr.io/ibmz/gcc@sha256:dcb6c8656914f01a48aadf73f31443f7bc211f407ac79ec785907a6799ffd275 Vulnerability Report07-22-2025
11.2.0 docker pull icr.io/ibmz/gcc@sha256:a0629a3ea5de6a7a7d43e59ab04efa6139e0af984f55b10b4fe41beae15de47f Vulnerability Report07-22-2025
12.2.0-bullseye docker pull icr.io/ibmz/gcc@sha256:43b0d0349c9b37e8eea15ec354458259ea2b7cfdf60168da29fc46045bf17345 Vulnerability Report07-22-2025
12 docker pull icr.io/ibmz/gcc@sha256:32537f0ae15506a44441516146d622640c3aeb21782578d79db4d76f82acc55d Vulnerability Report07-22-2025
Version Pull String Security (IBM Cloud) Created

Usage Notes

Start a GCC instance running your app:


The most straightforward way to use this image is to use a gcc container as both the build and runtime environment. In your Dockerfile, writing something along the lines of the following will compile and run your project:

FROM icr.io/ibmz/gcc:[version]
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
RUN gcc -o myapp main.c
CMD ["./myapp"]

Then, build and run the Docker image:

docker build -t my-gcc-app .


docker run -it --rm --name my-running-app my-gcc-app