[info=9df399f0c6f7cd25e6a59ef268c3b9b5]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/gcc-12-image?expand=0&rev=160
This commit is contained in:
commit
70e785c9e7
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
52
Dockerfile
Normal file
52
Dockerfile
Normal file
@ -0,0 +1,52 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon.
|
||||
|
||||
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified.
|
||||
# It is maintained by the BCI team and generated by
|
||||
# https://github.com/SUSE/BCI-dockerfile-generator
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
|
||||
|
||||
#!UseOBSRepositories
|
||||
|
||||
#!BuildTag: opensuse/bci/gcc:%%gcc_minor_version%%-%RELEASE%
|
||||
#!BuildTag: opensuse/bci/gcc:%%gcc_minor_version%%
|
||||
#!BuildTag: opensuse/bci/gcc:12
|
||||
|
||||
FROM opensuse/tumbleweed:latest
|
||||
|
||||
RUN set -euo pipefail; \
|
||||
zypper -n install --no-recommends gcc12 gcc12-c++ gcc12-fortran make curl findutils gawk git-core procps util-linux; \
|
||||
zypper -n clean; \
|
||||
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}
|
||||
|
||||
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
||||
# labelprefix=org.opensuse.bci.gcc
|
||||
LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI GNU Compiler Collection"
|
||||
LABEL org.opencontainers.image.description="GNU Compiler Collection container based on the openSUSE Tumbleweed Base Container Image."
|
||||
LABEL org.opencontainers.image.version="%%gcc_minor_version%%"
|
||||
LABEL org.opencontainers.image.url="https://www.opensuse.org"
|
||||
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
||||
LABEL org.opencontainers.image.vendor="openSUSE Project"
|
||||
LABEL org.opencontainers.image.source="%SOURCEURL%"
|
||||
LABEL org.opencontainers.image.ref.name="%%gcc_minor_version%%-%RELEASE%"
|
||||
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/bci/gcc:%%gcc_minor_version%%-%RELEASE%"
|
||||
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI"
|
||||
LABEL org.opensuse.release-stage="released"
|
||||
# endlabelprefix
|
||||
LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/gcc-12-image/README.md"
|
||||
LABEL io.artifacthub.package.logo-url="https://gcc.gnu.org/img/gccegg-65.png"
|
||||
ENV GCC_VERSION="%%gcc_minor_version%%"
|
||||
|
||||
# symlink all versioned gcc & g++ binaries to unversioned
|
||||
# ones in /usr/local/bin so that plain gcc works
|
||||
RUN set -euo pipefail; for gcc_bin in $(rpm -ql gcc12 gcc12-c++ gcc12-fortran |grep ^/usr/bin/ ); do \
|
||||
ln -sf $gcc_bin $(echo "$gcc_bin" | sed -e 's|/usr/bin/|/usr/local/bin/|' -e 's|-12$||'); \
|
||||
done
|
101
README.md
Normal file
101
README.md
Normal file
@ -0,0 +1,101 @@
|
||||
# openSUSE Tumbleweed BCI GNU Compiler Collection container image (GCC)
|
||||
![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green)
|
||||
|
||||
# Description
|
||||
The GNU Compiler Collection (GCC) is an optimizing compiler for various
|
||||
architectures and operating systems. It is the default compiler in the GNU
|
||||
project and most Linux distributions, including SUSE Linux Enterprise and
|
||||
openSUSE.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Compile an application with a `Dockerfile`
|
||||
|
||||
Normally, you'd want to compile an application and distribute it as part of a
|
||||
custom container image. To do this, create a `Dockerfile` similar to the one
|
||||
below. The `Dockerfile` uses this image to build a custom container image,
|
||||
copies the sources to a working directory, and compiles the application:
|
||||
|
||||
```Dockerfile
|
||||
FROM registry.opensuse.org/opensuse/bci/gcc:12
|
||||
WORKDIR /src/
|
||||
COPY . /src/
|
||||
RUN gcc main.c src1.c src2.c
|
||||
CMD ["./a.out"]
|
||||
```
|
||||
|
||||
It is also possible to compile a static binary with gcc as part of a multistage
|
||||
build:
|
||||
|
||||
```Dockerfile
|
||||
FROM registry.opensuse.org/opensuse/bci/gcc:12 as builder
|
||||
WORKDIR /src/
|
||||
COPY . /src/
|
||||
RUN gcc -o app main.c src1.c src2.c
|
||||
|
||||
FROM registry.opensuse.org/opensuse/bci/bci-micro:latest
|
||||
WORKDIR /build/
|
||||
COPY --from=builder /src/app /build/
|
||||
CMD ["/build/app"]
|
||||
```
|
||||
|
||||
Note that you must build a static binary to deploy it into bci-micro; otherwise
|
||||
shared libraries might be missing. You cannot deploy such an app into a
|
||||
`scratch` image, as it is not possible to statically link glibc.
|
||||
|
||||
|
||||
### Available build systems
|
||||
|
||||
The container image comes with `make` by default. Other build systems and
|
||||
related utilities are available in the repository, and they can be installed
|
||||
using `zypper`. This includes the following:
|
||||
- `meson`
|
||||
- `cmake`
|
||||
- `ninja`
|
||||
- `autoconf` & `automake`
|
||||
|
||||
|
||||
### Available compiler frontends
|
||||
|
||||
The GNU Compiler Collections supports a wide range of frontends. The container
|
||||
image ships the C, C++ and fortran frontends available as `gcc`, `g++` and `gfortran`
|
||||
respectively. The following additional frontends can be installed from the
|
||||
repository:
|
||||
- `gcc12-ada` for the Ada frontend (GNAT)
|
||||
- `gcc12-go` for the Go frontend
|
||||
- `gcc12-objc` and `gcc12-obj-c++` for the Objective C and Objective C++
|
||||
- `gcc12-d` for the frontend to the D Language
|
||||
|
||||
|
||||
### Using the container image interactively
|
||||
|
||||
You can use the image to create ephemeral containers that execute only gcc. This
|
||||
can be useful in situations, where building a full container image is not
|
||||
practical. One way to do this is to mount the working directory of an
|
||||
application into the launched container and compile the application there:
|
||||
|
||||
```bash
|
||||
podman run --rm -it -v $(pwd):/src/:Z registry.opensuse.org/opensuse/bci/gcc:12 \
|
||||
gcc -o /src/app.out /src/*.c
|
||||
```
|
||||
or by invoking `make`
|
||||
```bash
|
||||
podman run --rm -it -v $(pwd):/src/:Z --workdir /src/ \
|
||||
registry.opensuse.org/opensuse/bci/gcc:12 \
|
||||
make
|
||||
```
|
||||
|
||||
Note that the binary built using this approach are unlikely to work on a local
|
||||
machine. They only work on operating systems that are binary-compatible to
|
||||
openSUSE Tumbleweed.
|
||||
|
||||
## Licensing
|
||||
|
||||
`SPDX-License-Identifier: GPL-3.0-or-later`
|
||||
|
||||
This documentation and the build recipe are licensed as GPL-3.0-or-later.
|
||||
The container itself contains various software components under various open source licenses listed in the associated
|
||||
Software Bill of Materials (SBOM).
|
||||
|
||||
This image is based on [openSUSE Tumbleweed](https://get.opensuse.org/tumbleweed/).
|
7
_constraints
Normal file
7
_constraints
Normal file
@ -0,0 +1,7 @@
|
||||
<constraints>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">6</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</constraints>
|
10
_service
Normal file
10
_service
Normal file
@ -0,0 +1,10 @@
|
||||
<services>
|
||||
<service mode="buildtime" name="docker_label_helper"/>
|
||||
<service mode="buildtime" name="kiwi_metainfo_helper"/>
|
||||
<service mode="buildtime" name="replace_using_package_version">
|
||||
<param name="file">Dockerfile</param>
|
||||
<param name="regex">%%gcc_minor_version%%</param>
|
||||
<param name="package">gcc12</param>
|
||||
<param name="parse-version">minor</param>
|
||||
</service>
|
||||
</services>
|
159
gcc-12-image.changes
Normal file
159
gcc-12-image.changes
Normal file
@ -0,0 +1,159 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 1 14:13:48 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- update copyright year
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 3 13:26:37 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- Change attribute order in _service
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 8 10:49:01 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- add logo url
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 7 13:55:54 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- update license to the one of the main package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 30 15:34:45 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- remove nonsensical org.opencontainers.image.authors - duplication of .vendor
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 29 15:23:20 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- drop tag_version-%RELEASE%
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 29 14:22:15 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- add fortran
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 14 11:26:26 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- make the version-%release tag the first one listed; remove duplicates where they existed; update image.ref/reference to point to the version-%release(-) tag
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 11 15:12:52 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- make the tag with -%RELEASE% the first tag listed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 28 08:15:08 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- fix registry references in READMEs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 25 17:36:16 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- rerender installation step in multiple lines, allow uninstalling optional packages
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 25 17:12:11 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- improved log cleaning
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 20:00:32 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- remove release tags for additional_versions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 23 07:17:50 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- use full version in container labels
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 12 10:37:22 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- set useobsrepositories explicitly
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 23 10:27:45 UTC 2024 - Dan Čermák <dcermak@suse.com>
|
||||
|
||||
- Add missing distro name in the README
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 14 12:30:32 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- install packages first
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 8 19:28:10 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- add oci.image.ref.name
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 8 16:43:43 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- remove oci reference annotation again
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 5 11:38:13 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- add OCI reference annotation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 3 08:56:51 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- set OCI.authors attribute instead of deprecated MAINTAINER
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 31 12:06:44 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- set specific lifecycle url for openSUSE BCI
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 28 06:52:02 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- add standard devel tools back to development containers
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 18 17:24:16 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- use sentence style capitalization in READMEs
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 10 15:11:25 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- update README; reduce unnecessary newlines
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 5 15:13:27 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- Don't add artifacthub labels into labelprefix section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 12:35:15 UTC 2024 - Alexandre Vicenzi <alexandre.vicenzi@suse.com>
|
||||
|
||||
- Fix grammar mistake in licensing footer
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 15 13:43:21 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- Add _constraints to prevent FTBFS
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 8 16:26:31 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- README fixes - better titles and follow recommended document structure
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 7 19:07:24 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- extend READMEs; correct eula for application images
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 7 12:37:35 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- install awk; use symlinks rather than hardlinks as they break the compiler
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 17 14:34:54 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||
|
||||
- First version of the GNU Compiler Collection 12 BCI
|
Loading…
Reference in New Issue
Block a user