This commit is contained in:
parent
24ee7c52fb
commit
f471472693
5 changed files with 55 additions and 38 deletions
|
@ -6,6 +6,7 @@ on:
|
||||||
branches: ['master']
|
branches: ['master']
|
||||||
paths:
|
paths:
|
||||||
- "fedora-40/**"
|
- "fedora-40/**"
|
||||||
|
- "fedora-40-minimal/**"
|
||||||
- "shared/**"
|
- "shared/**"
|
||||||
- ".forgejo/workflows/build-fedora-40.yml"
|
- ".forgejo/workflows/build-fedora-40.yml"
|
||||||
schedule:
|
schedule:
|
||||||
|
@ -22,12 +23,23 @@ jobs:
|
||||||
run: 'dnf install -y --setopt install_weak_deps=False nodejs git buildah qemu-user-static qemu-user-binfmt fuse-overlayfs --exclude container-selinux'
|
run: 'dnf install -y --setopt install_weak_deps=False nodejs git buildah qemu-user-static qemu-user-binfmt fuse-overlayfs --exclude container-selinux'
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
- name: Fulfill Package Manager Cache
|
||||||
|
run: dnf makecache -y --releasever 40
|
||||||
|
- 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 \
|
||||||
|
--pid=host --ipc=host --network=host --userns=host --uts=host -v /var/cache/dnf:/var/cache/dnf:O \
|
||||||
|
--manifest code.lightstands.xyz/standcoded/fedora:40-minimal .
|
||||||
|
env:
|
||||||
|
BUILDAH_ISOLATION: chroot
|
||||||
- name: Build Images
|
- name: Build Images
|
||||||
run: |
|
run: |
|
||||||
cd fedora-40 && \
|
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 manifest create code.lightstands.xyz/standcoded/fedora:40 && \
|
||||||
buildah --storage-opt mount_program=/usr/bin/fuse-overlayfs --cgroup-manager=cgroupfs build --arch aarch64 \
|
buildah --storage-opt mount_program=/usr/bin/fuse-overlayfs --cgroup-manager=cgroupfs build --arch aarch64 \
|
||||||
--pid=host --ipc=host --network=host --userns=host --uts=host --squash \
|
--pid=host --ipc=host --network=host --userns=host --uts=host -v /var/cache/dnf:/var/cache/dnf:O \
|
||||||
--manifest code.lightstands.xyz/standcoded/fedora:40 .
|
--manifest code.lightstands.xyz/standcoded/fedora:40 .
|
||||||
env:
|
env:
|
||||||
BUILDAH_ISOLATION: chroot
|
BUILDAH_ISOLATION: chroot
|
||||||
|
@ -35,5 +47,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
buildah login code.lightstands.xyz \
|
buildah login code.lightstands.xyz \
|
||||||
--username ${{ env.GITHUB_ACTOR }} --password ${{ secrets.PUBLICATION_TOKEN }} && \
|
--username ${{ env.GITHUB_ACTOR }} --password ${{ secrets.PUBLICATION_TOKEN }} && \
|
||||||
|
buildah manifest push code.lightstands.xyz/standcoded/fedora:40-minimal --all && \
|
||||||
buildah manifest push code.lightstands.xyz/standcoded/fedora:40 --all
|
buildah manifest push code.lightstands.xyz/standcoded/fedora:40 --all
|
||||||
|
|
||||||
|
|
33
fedora-40-minimal/Containerfile
Normal file
33
fedora-40-minimal/Containerfile
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
FROM fedora:40
|
||||||
|
|
||||||
|
RUN dnf update -y --setopt install_weak_deps=False && \
|
||||||
|
dnf install -y --setopt install_weak_deps=False git git-lfs git-ftp fuse-overlayfs \
|
||||||
|
nodejs nodejs-npm python3-devel python3-pip pipx coreutils bash clang gcc \
|
||||||
|
aria2 jq yq zstd brotli perl perl-CPAN ruby rubygems sqlite && \
|
||||||
|
dnf group install -y --setopt install_weak_deps=False "Container Management" --exclude container-selinux && \
|
||||||
|
dnf clean all -y
|
||||||
|
|
||||||
|
ADD containers.conf /etc/containers/
|
||||||
|
ADD containers/storage.conf /etc/containers/
|
||||||
|
|
||||||
|
# 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 && \
|
||||||
|
echo -e "action:1:999\action:1001:64535" > /etc/subuid && \
|
||||||
|
echo -e "action:1:999\action:1001:64535" > /etc/subgid && \
|
||||||
|
mkdir -p /home/action/.local/share/containers && \
|
||||||
|
mkdir -p /home/action/.config/containers && \
|
||||||
|
chown -R action:action /home/action
|
||||||
|
|
||||||
|
VOLUME /var/lib/containers
|
||||||
|
VOLUME /home/action/.local/share/containers
|
||||||
|
|
||||||
|
# Set up environment variables to note that this is
|
||||||
|
# not starting with usernamespace and default to
|
||||||
|
# isolate the filesystem with chroot.
|
||||||
|
ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/bin/bash" ]
|
|
@ -1,46 +1,17 @@
|
||||||
FROM fedora:40
|
FROM code.lightstands.xyz/standcoded/fedora:40-minimal
|
||||||
|
|
||||||
RUN dnf update -y --setopt install_weak_deps=False && \
|
RUN dnf install -y --setopt install_weak_deps=False \
|
||||||
dnf install -y --setopt install_weak_deps=False \
|
sqlite-devel binutils \
|
||||||
git git-lfs git-ftp \
|
|
||||||
jq yq sqlite sqlite-devel coreutils brotli zstd binutils aria2 bash \
|
|
||||||
fuse-overlayfs \
|
|
||||||
bison flex \
|
bison flex \
|
||||||
nodejs nodejs-devel nodejs-npm \
|
nodejs-devel \
|
||||||
python3-devel python3-pip pipx poetry \
|
poetry \
|
||||||
perl perl-devel perl-CPAN \
|
perl-devel \
|
||||||
ruby ruby-devel rubygems \
|
ruby-devel \
|
||||||
php php-devel composer \
|
php php-devel composer \
|
||||||
java-1.8.0-openjdk java-1.8.0-openjdk-devel maven-openjdk8 \
|
java-1.8.0-openjdk java-1.8.0-openjdk-devel \
|
||||||
java-11-openjdk java-11-openjdk-devel \
|
java-11-openjdk java-11-openjdk-devel \
|
||||||
java-17-openjdk java-17-openjdk-devel \
|
java-17-openjdk java-17-openjdk-devel \
|
||||||
java-21-openjdk java-21-openjdk-devel \
|
java-21-openjdk java-21-openjdk-devel \
|
||||||
qemu-user-static qemu-user-binfmt && \
|
qemu-user-static qemu-user-binfmt && \
|
||||||
dnf group install -y --setopt install_weak_deps=False "C Development Tools and Libraries" && \
|
dnf group install -y --setopt install_weak_deps=False "C Development Tools and Libraries" && \
|
||||||
dnf group install -y --setopt install_weak_deps=False "Container Management" --exclude container-selinux &&\
|
|
||||||
dnf clean all -y
|
dnf clean all -y
|
||||||
|
|
||||||
ADD containers.conf /etc/containers/
|
|
||||||
ADD containers/storage.conf /etc/containers/
|
|
||||||
|
|
||||||
# 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 && \
|
|
||||||
echo -e "act:1:999\act:1001:64535" > /etc/subuid && \
|
|
||||||
echo -e "act:1:999\act:1001:64535" > /etc/subgid && \
|
|
||||||
mkdir -p /home/action/.local/share/containers && \
|
|
||||||
mkdir -p /home/action/.config/containers && \
|
|
||||||
chown -R action:action /home/action
|
|
||||||
|
|
||||||
VOLUME /var/lib/containers
|
|
||||||
VOLUME /home/action/.local/share/containers
|
|
||||||
|
|
||||||
# Set up environment variables to note that this is
|
|
||||||
# not starting with usernamespace and default to
|
|
||||||
# isolate the filesystem with chroot.
|
|
||||||
ENV _BUILDAH_STARTED_IN_USERNS="" BUILDAH_ISOLATION=chroot
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/bash" ]
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue