Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build container images inside CS9 container #861

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,38 @@ on:
jobs:
build_container:
runs-on: ubuntu-latest
container:
image: quay.io/centos/centos:stream9
options: --security-opt=seccomp:unconfined --security-opt=label:disable --device /dev/fuse
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 configuration
run: |
sed -i \
-e 's|^#mount_program|mount_program|g' \
-e '/additionalimage.*/a "/var/lib/shared",' \
/etc/containers/storage.conf
mkdir -p \
/var/lib/shared/overlay-images \
/var/lib/shared/overlay-layers
touch /var/lib/shared/overlay-images/images.lock
touch /var/lib/shared/overlay-layers/layers.lock

- 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
Loading