From cf3f33c703635f4dc92651c6a2df28a59fe8104a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Thu, 19 Oct 2023 17:02:57 +0200 Subject: [PATCH] Import Fedora images --- .github/workflows/fedora-pr.yaml | 43 +++++++++++++++++++++ .github/workflows/fedora.yaml | 65 ++++++++++++++++++++++++++++++++ fedora/f37/Containerfile | 44 +++++++++++++++++++++ fedora/f37/README.md | 44 +++++++++++++++++++++ fedora/f37/ensure-files | 25 ++++++++++++ fedora/f37/extra-packages | 48 +++++++++++++++++++++++ fedora/f37/missing-docs | 20 ++++++++++ fedora/f38/Containerfile | 44 +++++++++++++++++++++ fedora/f38/README.md | 44 +++++++++++++++++++++ fedora/f38/ensure-files | 25 ++++++++++++ fedora/f38/extra-packages | 48 +++++++++++++++++++++++ fedora/f38/missing-docs | 20 ++++++++++ fedora/f39/Containerfile | 37 ++++++++++++++++++ fedora/f39/README.md | 44 +++++++++++++++++++++ fedora/f39/ensure-files | 25 ++++++++++++ fedora/f39/extra-packages | 48 +++++++++++++++++++++++ fedora/f39/missing-docs | 20 ++++++++++ 17 files changed, 644 insertions(+) create mode 100644 .github/workflows/fedora-pr.yaml create mode 100644 .github/workflows/fedora.yaml create mode 100644 fedora/f37/Containerfile create mode 100644 fedora/f37/README.md create mode 100644 fedora/f37/ensure-files create mode 100644 fedora/f37/extra-packages create mode 100644 fedora/f37/missing-docs create mode 100644 fedora/f38/Containerfile create mode 100644 fedora/f38/README.md create mode 100644 fedora/f38/ensure-files create mode 100644 fedora/f38/extra-packages create mode 100644 fedora/f38/missing-docs create mode 100644 fedora/f39/Containerfile create mode 100644 fedora/f39/README.md create mode 100644 fedora/f39/ensure-files create mode 100644 fedora/f39/extra-packages create mode 100644 fedora/f39/missing-docs diff --git a/.github/workflows/fedora-pr.yaml b/.github/workflows/fedora-pr.yaml new file mode 100644 index 00000000..b833f36e --- /dev/null +++ b/.github/workflows/fedora-pr.yaml @@ -0,0 +1,43 @@ +name: "fedora: Build toolbx images for PRs" + +permissions: read-all + +on: + pull_request: + branches: + - main + paths: + - fedora/** + - .github/workflows/fedora-pr.yaml + +env: + distro: 'fedora' + distro_pretty: 'fedora' + latest_release: 'f38' + +jobs: + build-images: + strategy: + matrix: + release: ['f37', 'f38', 'f39'] + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build ${{ env.distro_pretty }} ${{ matrix.release }} toolbox image + uses: docker/build-push-action@v3 + with: + context: ${{ env.distro }}/${{ matrix.release }} + file: ${{ env.distro }}/${{ matrix.release }}/Containerfile + platforms: linux/amd64,linux/arm64 + push: false + no-cache: true + tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:${{ matrix.release }} diff --git a/.github/workflows/fedora.yaml b/.github/workflows/fedora.yaml new file mode 100644 index 00000000..60da654b --- /dev/null +++ b/.github/workflows/fedora.yaml @@ -0,0 +1,65 @@ +name: "fedora: Build and push toolbx images" + +permissions: read-all + +on: + push: + branches: + - main + paths: + - fedora/** + - .github/workflows/fedora.yaml + schedule: + - cron: '0 0 * * MON' + +# Prevent multiple workflow runs from racing +concurrency: ${{ github.workflow }} + +env: + distro: 'fedora' + distro_pretty: 'fedora' + latest_release: 'f38' + +jobs: + build-and-push-images: + strategy: + matrix: + release: ['f37', 'f38', 'f39'] + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Quay.io + uses: docker/login-action@v2 + with: + registry: quay.io + username: 'toolbx-images+github' + password: ${{ secrets.QUAY_ROBOT_TOKEN }} + + - name: Build and push ${{ env.distro_pretty }} ${{ matrix.release }} toolbox image + uses: docker/build-push-action@v3 + with: + context: ${{ env.distro }}/${{ matrix.release }} + file: ${{ env.distro }}/${{ matrix.release }}/Containerfile + platforms: linux/amd64,linux/arm64 + push: true + no-cache: true + tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:${{ matrix.release }} + + - name: Push latest tag + if: env.latest_release == matrix.release + uses: docker/build-push-action@v3 + with: + context: ${{ env.distro }}/${{ matrix.release }} + file: ${{ env.distro }}/${{ matrix.release }}/Containerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:latest diff --git a/fedora/f37/Containerfile b/fedora/f37/Containerfile new file mode 100644 index 00000000..a58be5b7 --- /dev/null +++ b/fedora/f37/Containerfile @@ -0,0 +1,44 @@ +FROM registry.fedoraproject.org/fedora:37 + +ARG NAME=fedora-toolbox +ARG VERSION=37 +LABEL com.github.containers.toolbox="true" \ + com.redhat.component="$NAME" \ + name="$NAME" \ + version="$VERSION" \ + usage="This image is meant to be used with the toolbox command" \ + summary="Base image for creating Fedora toolbox containers" \ + maintainer="Debarshi Ray " + +COPY README.md / + +RUN rm /etc/rpm/macros.image-language-conf +RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf + +RUN dnf -y upgrade +RUN dnf -y swap coreutils-single coreutils-full +RUN dnf -y swap glibc-minimal-langpack glibc-all-langpacks + +COPY missing-docs / +RUN dnf -y reinstall $(/dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done /dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done /dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done