commit 655745f5060d78df8eff17ead3289fdb2d1821a7 Author: Ben Radey Date: Sun May 21 00:53:19 2023 -0400 Initial commit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0ee7ee6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build +on: + schedule: + - cron: "21 21 * * *" + push: + branches: ["main"] + +env: + REGISTRY: ghcr.io + SERVER_IMAGE_NAME: "f38-server" + SERVER_IMAGE_DIR: "f38-server" + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + REGISTRY_USER: ${{ github.actor }} + REGISTRY_PASSWORD: ${{ github.token }} + + +jobs: + f38-server: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Build container image + uses: redhat-actions/buildah-build@v2 + with: + context: ${{ env.SERVER_IMAGE_DIR }} + containerfiles: ${{ env.SERVER_IMAGE_DIR }}/Containerfile + image: ${{ env.SERVER_IMAGE_NAME }} + layers: false + oci: true + + - name: Push to ghcr.io + uses: redhat-actions/push-to-registry@v2.6 + with: + image: ${{ env.SERVER_IMAGE_NAME }} + tags: "latest" + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_PASSWORD }} + extra-args: | + --disable-content-trust + diff --git a/f38-server/Containerfile b/f38-server/Containerfile new file mode 100644 index 0000000..4dfee66 --- /dev/null +++ b/f38-server/Containerfile @@ -0,0 +1,32 @@ +FROM ghcr.io/cgwalters/fedora-silverblue:38 + +# Install ZFS repository +RUN rpm-ostree install https://zfsonlinux.org/fedora/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm && \ + # cleanup and verification stage + rm -vrf /var /*.rpm && \ + ostree container commit + +# Install ZFS build deps +RUN rpm-ostree install \ + kernel-devel kernel-devel-matched kernel-headers kernel-srpm-macros && \ + # cleanup and verification stage + rm -vrf /var && \ + ostree container commit + +# TODO: Remove the following line once this bug is fixed: https://github.com/coreos/rpm-ostree/issues/4201 +RUN test -f /usr/bin/ld || ln -s /usr/bin/ld.bfd /usr/bin/ld + +# Install zfs +RUN rpm-ostree install zfs && \ + dkms autoinstall -k $(rpm -qa kernel --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}') && \ + # cleanup and verification stage + rm -vrf /var && \ + ostree container commit + +# TODO: Remove the following line once this bug is fixed: https://github.com/coreos/rpm-ostree/issues/4201 +RUN test -h /usr/bin/ld && rm -v /usr/bin/ld + +RUN rpm-ostree install \ + distrobox iotop screen vim fuse-encfs borgbackup htop rclone ipmitool fuse-sshfs smartmontools nut \ + && rm -vrf /var && ostree container commit +