From e4cd629b3e7226234882bad9530da1b3e7bb1787 Mon Sep 17 00:00:00 2001 From: Sam Clark <1059176+samhclark@users.noreply.github.com> Date: Sun, 18 Aug 2024 18:40:44 -0500 Subject: [PATCH] Install Docker Desktop again --- Containerfile | 27 ++++++++++++++++++--------- custom-origin.yaml | 2 ++ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Containerfile b/Containerfile index da6460e..165e1cc 100644 --- a/Containerfile +++ b/Containerfile @@ -1,17 +1,26 @@ +FROM quay.io/fedora-ostree-desktops/silverblue:40 as docker-desktop-rpm +COPY checksums checksums +ADD https://desktop.docker.com/linux/main/amd64/160616/docker-desktop-x86_64.rpm docker-desktop-x86_64.rpm +RUN sha256sum -c checksums + FROM quay.io/fedora-ostree-desktops/silverblue:40 as silverblue COPY docker-ce.repo /etc/yum.repos.d/docker-ce.repo COPY vscode.repo /etc/yum.repos.d/vscode.repo COPY custom-origin.yaml /etc/rpm-ostree/origin.d/custom-origin.yaml -COPY checksums /tmp/checksums -ADD https://desktop.docker.com/linux/main/amd64/160616/docker-desktop-x86_64.rpm /tmp/docker-desktop-x86_64.rpm +RUN rpm-ostree ex rebuild \ + && systemctl enable rpm-ostreed-automatic.timer + +# Copying this pattern from here https://github.com/coreos/rpm-ostree/issues/233#issuecomment-1301194050 +# There have been updates since this was written in Nov 2022 but as of July 2024, this is still the +# recommended way https://github.com/coreos/fedora-coreos-tracker/issues/1681#issuecomment-2211137520 +COPY --from=docker-desktop-rpm docker-desktop-x86_64.rpm docker-desktop-x86_64.rpm +RUN mkdir /var/opt \ + && rpm -Uvh docker-desktop-x86_64.rpm \ + && mv /var/opt/docker-desktop /usr/lib/opt/docker-desktop \ + && echo 'L /opt/docker-desktop - - - - ../../usr/lib/opt/docker-desktop' > /usr/lib/tmpfiles.d/docker-desktop.conf \ + && rm -f docker-desktop-x86_64.rpm -RUN cd /tmp && sha256sum -c checksums \ - && rpm-ostree ex rebuild \ - && rpm-ostree install --cache-only /tmp/docker-desktop-x86_64.rpm \ - && rm -f /tmp/checksums \ - && rm -f /tmp/docker-desktop-x86_64.rpm \ - && systemctl enable rpm-ostreed-automatic.timer \ - && rpm-ostree cleanup -m \ +RUN rpm-ostree cleanup -m \ && ostree container commit diff --git a/custom-origin.yaml b/custom-origin.yaml index 0b8e538..be4118e 100644 --- a/custom-origin.yaml +++ b/custom-origin.yaml @@ -13,10 +13,12 @@ packages: - gnome-shell-extension-appindicator - gnome-shell-extension-gsconnect - gnome-tweaks + - gtk3-devel - guestfs-tools - libvirt-daemon-config-network - libvirt-daemon-kvm - openssh-askpass + - pass - python3-libguestfs - ptyxis - qemu-kvm