Skip to content

Commit

Permalink
Build container images inside CS9 container
Browse files Browse the repository at this point in the history
To mitigate issues around different buildah versions between Fedora/CS9
and Ubuntu, let's build images inside CS9 container.

Signed-off-by: Martin Perina <[email protected]>
  • Loading branch information
mwperina committed Mar 27, 2024
1 parent 697bc57 commit 393b42e
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,33 @@ on:
jobs:
build_container:
runs-on: ubuntu-latest
container:
image: quay.io/centos/centos:stream9
options: --security-opt=seccomp:unconfined --security-opt=label:disable
steps:
# Specific steps taken from https://developers.redhat.com/blog/2019/08/14/best-practices-for-running-buildah-in-a-container#setup
- name: Install dependencies
run: |
dnf install \
buildah \
fuse-overlayfs \
--exclude container-selinux \
-y
- name: Adjust container storage
run: |
sed -i \
-e 's|^#mount_program|mount_program|g' \
-e '/additionalimage.*/a "/var/lib/shared",' \
/etc/containers/storage.conf
- name: Checkout sources
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build manifest
run: |
export _BUILDAH_STARTED_IN_USERNS=""
export BUILDAH_ISOLATION=chroot
./build-scripts/build-push-containers.sh ${{ inputs.image }}
- name: Push manifest o quay.io
Expand Down

0 comments on commit 393b42e

Please sign in to comment.