The official GCC docker image.
Maintained by: openEuler CloudNative SIG.
Where to get help: openEuler CloudNative SIG, openEuler.
Current GCC docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, D, Modula-2, and COBOL as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.
Learn more about GCC on GCC Website.
The tag of each gcc docker image is consist of the version of gcc and the version of basic image. The details are as follows
| Tag | Currently | Architectures |
|---|---|---|
| 16.1.0-oe2403sp4 | gcc 16.1.0 on openEuler 24.03-LTS-SP4 | amd64, arm64 |
| 16.1.0-oe2403sp3 | gcc 16.1.0 on openEuler 24.03-LTS-SP3 | amd64, arm64 |
| 15.1.0-oe2403sp1 | GCC 15.1.0 on openEuler 24.03-LTS-SP1 | amd64, arm64 |
In this usage, users can select the corresponding {Tag} based on their requirements.
Pull the openeuler/gcc image from docker
docker pull openeuler/gcc:{Tag}
Run with an interactive shell
You can start the container with an interactive shell to run your own code using gcc.
docker run -it --rm openeuler/gcc:{Tag} bash
Example: A minimal gcc program
Create a file named hello.c with the following content:
// hello.c
#include <stdio.h>
int main() {
printf("Hello from GCC %d.%d.%d\n",
__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
return 0;
}
Compile the program:
Use the new version of gcc to compile the program:
/usr/local/gcc/bin/gcc hello.c -o hello
Run the program
$ ./hello
If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.
Content type
Image
Digest
sha256:540f49b51…
Size
3.8 GB
Last updated
4 months ago
docker pull openeuler/gccPulls:
14
Last week