mirror of
https://codeberg.org/hyperreal/containers
synced 2024-11-25 11:43:41 +01:00
Use shell-exec to run buildah
This commit is contained in:
parent
d578422ace
commit
5e1406f82a
@ -4,14 +4,12 @@ stages:
|
|||||||
fedora-build-job:
|
fedora-build-job:
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
- podman-exec
|
- shell-exec
|
||||||
image: git.hyperreal.coffee:5050/fedora-atomic/containers/buildah:latest
|
|
||||||
variables:
|
variables:
|
||||||
STORAGE_DRIVER: vfs
|
|
||||||
BUILDAH_FORMAT: docker
|
|
||||||
BUILDAH_ISOLATION: chroot
|
|
||||||
FQ_IMAGE_NAME: "$CI_REGISTRY_IMAGE/fedora:latest"
|
FQ_IMAGE_NAME: "$CI_REGISTRY_IMAGE/fedora:latest"
|
||||||
before_script:
|
before_script:
|
||||||
|
- buildah rm --all
|
||||||
|
- buildah prune -af
|
||||||
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
||||||
script:
|
script:
|
||||||
- container=$(buildah from registry.fedoraproject.org/fedora:latest)
|
- container=$(buildah from registry.fedoraproject.org/fedora:latest)
|
||||||
@ -25,14 +23,13 @@ fedora-build-job:
|
|||||||
fedora-distrobox-build-job:
|
fedora-distrobox-build-job:
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
- podman-exec
|
- shell-exec
|
||||||
image: git.hyperreal.coffee:5050/fedora-atomic/containers/buildah:latest
|
|
||||||
variables:
|
variables:
|
||||||
STORAGE_DRIVER: vfs
|
|
||||||
BUILDAH_FORMAT: docker
|
BUILDAH_FORMAT: docker
|
||||||
BUILDAH_ISOLATION: chroot
|
|
||||||
FQ_IMAGE_NAME: "$CI_REGISTRY_IMAGE/fedora-distrobox:39"
|
FQ_IMAGE_NAME: "$CI_REGISTRY_IMAGE/fedora-distrobox:39"
|
||||||
before_script:
|
before_script:
|
||||||
|
- buildah rm --all
|
||||||
|
- buildah prune -af
|
||||||
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
- buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
||||||
script:
|
script:
|
||||||
- container=$(buildah from registry.fedoraproject.org/fedora-toolbox:39)
|
- container=$(buildah from registry.fedoraproject.org/fedora-toolbox:39)
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
FROM quay.io/buildah/stable:v1.34.0
|
|
||||||
|
|
||||||
RUN touch /etc/subgid /etc/subuid \
|
|
||||||
&& chmod g=u /etc/subgid /etc/subuid /etc/passwd \
|
|
||||||
&& echo build:10000:65536 > /etc/subuid \
|
|
||||||
&& echo build:10000:65536 > /etc/subgid
|
|
||||||
|
|
||||||
# Use chroot since the default runc doesn't work when running rootless
|
|
||||||
RUN echo "export BUILDAH_ISOLATION=chroot" >> /home/build/.bashrc
|
|
||||||
|
|
||||||
# Use VFS since fuse does not work
|
|
||||||
RUN mkdir -p /home/build/.config/containers \
|
|
||||||
&& (echo '[storage]';echo 'drive = "vfs"') > /home/build/.config/containers/storage.conf
|
|
||||||
|
|
||||||
# The buildah container will run as build user
|
|
||||||
USER build
|
|
||||||
WORKDIR /home/build
|
|
Loading…
Reference in New Issue
Block a user