diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d5382fa5cd..ee630f4f632 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,6 @@ on: merge_group: workflow_dispatch: env: - IMAGE_BASE_NAME: bluefin IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} jobs: @@ -24,6 +23,7 @@ jobs: fail-fast: false matrix: image_flavor: [main, nvidia] + base_name: [bluefin, bluefin-dx] major_version: [37, 38] include: - major_version: 37 @@ -40,9 +40,9 @@ jobs: - name: Matrix Variables run: | if [[ "${{ matrix.image_flavor }}" == "main" ]]; then - echo "IMAGE_NAME=bluefin" >> $GITHUB_ENV + echo "IMAGE_NAME=${{ matrix.base_name }}" >> $GITHUB_ENV else - echo "IMAGE_NAME=${{ format('{0}-{1}', env.IMAGE_BASE_NAME, matrix.image_flavor) }}" >> $GITHUB_ENV + echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.base_name, matrix.image_flavor) }}" >> $GITHUB_ENV fi - name: Generate tags @@ -122,6 +122,8 @@ jobs: FEDORA_MAJOR_VERSION=${{ matrix.major_version }} labels: ${{ steps.meta.outputs.labels }} oci: false + extra-args: | + --target=${{ matrix.base_name }} # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. # https://github.com/macbre/push-to-ghcr/issues/12 diff --git a/Containerfile b/Containerfile index 1e8bc930f9d..f1ed22c7260 100644 --- a/Containerfile +++ b/Containerfile @@ -4,7 +4,7 @@ ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}" ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}" -FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bluefin ARG IMAGE_NAME="${IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" @@ -45,3 +45,30 @@ COPY --from=cgr.dev/chainguard/cosign:latest /usr/bin/cosign /usr/bin/cosign RUN curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.17.0/kind-$(uname)-amd64" RUN chmod +x ./kind RUN mv ./kind /usr/bin/kind + +FROM bluefin AS bluefin-dx + +ARG IMAGE_NAME="${IMAGE_NAME}" +ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" + +# If you need to copy specific files for this -dx edition create +# a directory called "dx" in the project root, create an etc, in +# there and drop your files in. Uncomment the line below to enable +COPY dx/etc /etc + +RUN wget https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo + +RUN rpm-ostree install code +RUN rpm-ostree install lxd lxc +RUN rpm-ostree install iotop dbus-x11 podman-compose podman-docker podman-plugins podman-tui +RUN rpm-ostree install cascadia-code-fonts google-droid-sans-mono-fonts google-go-mono-fonts ibm-plex-mono-fonts mozilla-fira-mono-fonts +RUN rpm-ostree install qemu qemu-user-static qemu-user-binfmt virt-manager libvirt qemu qemu-user-static qemu-user-binfmt edk2-ovmf +RUN rpm-ostree install cockpit-bridge cockpit-system cockpit-networkmanager cockpit-selinux cockpit-storaged cockpit-podman cockpit-machines cockpit-pcp + +COPY --from=cgr.dev/chainguard/flux:latest /usr/bin/flux /usr/bin/flux +COPY --from=cgr.dev/chainguard/helm:latest /usr/bin/helm /usr/bin/helm +COPY --from=cgr.dev/chainguard/ko:latest /usr/bin/ko /usr/bin/ko +COPY --from=cgr.dev/chainguard/minio-client:latest /usr/bin/mc /usr/bin/mc + +RUN rm -rf /tmp/* /var/* +RUN ostree container commit diff --git a/dx/etc/yum.repos.d/hashicorp.repo b/dx/etc/yum.repos.d/hashicorp.repo new file mode 100644 index 00000000000..5e06b888a31 --- /dev/null +++ b/dx/etc/yum.repos.d/hashicorp.repo @@ -0,0 +1,13 @@ +[hashicorp] +name=Hashicorp Stable - $basearch +baseurl=https://rpm.releases.hashicorp.com/fedora/$releasever/$basearch/stable +enabled=1 +gpgcheck=1 +gpgkey=https://rpm.releases.hashicorp.com/gpg + +[hashicorp-test] +name=Hashicorp Test - $basearch +baseurl=https://rpm.releases.hashicorp.com/fedora/$releasever/$basearch/test +enabled=0 +gpgcheck=1 +gpgkey=https://rpm.releases.hashicorp.com/gpg \ No newline at end of file diff --git a/dx/etc/yum.repos.d/vscode.repo b/dx/etc/yum.repos.d/vscode.repo new file mode 100644 index 00000000000..e9f10a5a4a8 --- /dev/null +++ b/dx/etc/yum.repos.d/vscode.repo @@ -0,0 +1,6 @@ +[code] +name=Visual Studio Code +baseurl=https://packages.microsoft.com/yumrepos/vscode +enabled=1 +gpgcheck=0 +gpgkey=https://packages.microsoft.com/keys/microsoft.asc