Compare commits
No commits in common. "de7db636424eae963bcf511220906de201ab7cdf" and "c9afabb81fab6e3985d4a423d1dd422144cfffb5" have entirely different histories.
de7db63642
...
c9afabb81f
4 changed files with 15 additions and 39 deletions
|
@ -17,10 +17,10 @@ jobs:
|
|||
build:
|
||||
runs-on: linux-lg
|
||||
container:
|
||||
image: fedora:40
|
||||
image: code.lightstands.xyz/standcoded/fedora:40
|
||||
steps:
|
||||
- name: Install Tools
|
||||
run: 'dnf install -y --setopt install_weak_deps=False nodejs git buildah qemu-user-static qemu-user-binfmt fuse-overlayfs --exclude container-selinux'
|
||||
- name: Install tools
|
||||
run: dnf install -y --setopt install_weak_deps=False buildah
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Fulfill Package Manager Cache
|
||||
|
@ -28,17 +28,17 @@ jobs:
|
|||
- name: Build Minimal Images
|
||||
run: |
|
||||
cd fedora-40-minimal && \
|
||||
buildah --storage-opt mount_program=/usr/bin/fuse-overlayfs --cgroup-manager=cgroupfs manifest create code.lightstands.xyz/standcoded/fedora:40-minimal && \
|
||||
buildah --storage-opt mount_program=/usr/bin/fuse-overlayfs --cgroup-manager=cgroupfs build --arch aarch64 \
|
||||
buildah --cgroup-manager=cgroupfs manifest create code.lightstands.xyz/standcoded/fedora-minimal:40 && \
|
||||
buildah --cgroup-manager=cgroupfs build --arch aarch64 \
|
||||
--pid=host --ipc=host --network=host --userns=host --uts=host -v /var/cache/dnf:/var/cache/dnf \
|
||||
--manifest code.lightstands.xyz/standcoded/fedora:40-minimal .
|
||||
--manifest code.lightstands.xyz/standcoded/fedora-minimal:40 .
|
||||
env:
|
||||
BUILDAH_ISOLATION: chroot
|
||||
- name: Build Images
|
||||
run: |
|
||||
cd fedora-40 && \
|
||||
buildah --storage-opt mount_program=/usr/bin/fuse-overlayfs --cgroup-manager=cgroupfs manifest create code.lightstands.xyz/standcoded/fedora:40 && \
|
||||
buildah --storage-opt mount_program=/usr/bin/fuse-overlayfs --cgroup-manager=cgroupfs build --arch aarch64 \
|
||||
buildah --cgroup-manager=cgroupfs manifest create code.lightstands.xyz/standcoded/fedora:40 && \
|
||||
buildah --cgroup-manager=cgroupfs build --arch aarch64 \
|
||||
--pid=host --ipc=host --network=host --userns=host --uts=host -v /var/cache/dnf:/var/cache/dnf \
|
||||
--manifest code.lightstands.xyz/standcoded/fedora:40 .
|
||||
env:
|
||||
|
|
|
@ -17,25 +17,11 @@ RUN dnf install -y --setopt install_weak_deps=False buildah podman --exclude con
|
|||
# We don't clean up dnf cache since user may want to install packages for their use
|
||||
|
||||
ADD containers.conf /etc/containers/
|
||||
ADD containers/storage.conf /etc/containers/
|
||||
|
||||
# Copy & modify the defaults to provide reference if runtime changes needed.
|
||||
# Changes here are required for running with fuse-overlay storage inside container.
|
||||
RUN sed -e 's|^#mount_program|mount_program|g' \
|
||||
-e '/additionalimage.*/a "/var/lib/shared",' \
|
||||
-e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' \
|
||||
/usr/share/containers/storage.conf \
|
||||
> /etc/containers/storage.conf && \
|
||||
chmod 644 /etc/containers/storage.conf && \
|
||||
chmod 644 /etc/containers/containers.conf
|
||||
|
||||
RUN mkdir -p /var/lib/shared/overlay-images \
|
||||
/var/lib/shared/overlay-layers \
|
||||
/var/lib/shared/vfs-images \
|
||||
/var/lib/shared/vfs-layers && \
|
||||
touch /var/lib/shared/overlay-images/images.lock && \
|
||||
touch /var/lib/shared/overlay-layers/layers.lock && \
|
||||
touch /var/lib/shared/vfs-images/images.lock && \
|
||||
touch /var/lib/shared/vfs-layers/layers.lock
|
||||
# Adjust storage.conf to enable Fuse storage.
|
||||
RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf
|
||||
RUN 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
|
||||
|
||||
# Define uid/gid ranges for our user https://github.com/containers/buildah/issues/3053
|
||||
RUN useradd action && \
|
||||
|
@ -45,18 +31,6 @@ RUN useradd action && \
|
|||
mkdir -p /home/action/.config/containers && \
|
||||
chown -R action:action /home/action
|
||||
|
||||
# See: https://github.com/containers/buildah/issues/4669
|
||||
# Copy & modify the config for the `action` user and remove the global
|
||||
# `runroot` and `graphroot` which current `actuib` user cannot access,
|
||||
# in such case storage will choose a runroot in `/var/tmp`.
|
||||
RUN sed -e 's|^#mount_program|mount_program|g' \
|
||||
-e 's|^graphroot|#graphroot|g' \
|
||||
-e 's|^runroot|#runroot|g' \
|
||||
/etc/containers/storage.conf \
|
||||
> /home/action/.config/containers/storage.conf && \
|
||||
chown action:action /home/action/.config/containers/storage.conf
|
||||
|
||||
|
||||
VOLUME /var/lib/containers
|
||||
VOLUME /home/action/.local/share/containers
|
||||
|
||||
|
|
2
fedora-40-minimal/containers/storage.conf
Normal file
2
fedora-40-minimal/containers/storage.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[storage.option.overlay]
|
||||
mount_program="/usr/bin/fuse-overlayfs"
|
|
@ -1,4 +1,4 @@
|
|||
FROM code.lightstands.xyz/standcoded/fedora:40-minimal
|
||||
FROM code.lightstands.xyz/standcoded/fedora-minimal:40
|
||||
|
||||
RUN dnf install -y --setopt install_weak_deps=False sqlite-devel binutils
|
||||
|
||||
|
|
Loading…
Reference in a new issue