Skip to content

Commit

Permalink
Replace Docker Desktop with docker cli on host
Browse files Browse the repository at this point in the history
  • Loading branch information
samhclark committed Sep 28, 2024
1 parent e5e4c64 commit dea6367
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 58 deletions.
13 changes: 0 additions & 13 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
ARG silverblue_version=40
FROM quay.io/fedora-ostree-desktops/silverblue:${silverblue_version}

COPY docker-ce.repo /etc/yum.repos.d/docker-ce.repo
COPY docker-release-public-key.asc /etc/pki/rpm-gpg/docker-release-public-key.asc
COPY vscode.repo /etc/yum.repos.d/vscode.repo
COPY microsoft-release-public-key.asc /etc/pki/rpm-gpg/microsoft-release-public-key.asc

ADD https://desktop.docker.com/linux/main/amd64/160616/docker-desktop-x86_64.rpm /docker-desktop-x86_64.rpm
RUN --mount=type=bind,source=checksums,target=/checksums,z sha256sum -c checksums

# Copying the pattern for installing Docker Desktop 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
RUN --mount=type=bind,source=packages.json,target=/packages.json,z \
rpm-ostree override remove \
$(jq -r '"--install=\(.add[].name)"' /packages.json | xargs) \
$(jq -r '.remove[].name' /packages.json | xargs) \
&& systemctl enable rpm-ostreed-automatic.timer \
&& 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 \
&& rpm-ostree cleanup --repomd

RUN ostree container commit
1 change: 0 additions & 1 deletion checksums

This file was deleted.

6 changes: 0 additions & 6 deletions docker-ce.repo

This file was deleted.

28 changes: 0 additions & 28 deletions docker-release-public-key.asc

This file was deleted.

12 changes: 2 additions & 10 deletions packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"name": "code",
"_comment": "Visual Studio Code needs to be on the host because it's an Electron app"
},
{
"name": "docker-ce-cli",
"_comment": "Required for Docker Desktop"
},
{
"name": "gcc",
"_comment": "Required for Homebrew"
Expand All @@ -20,10 +16,6 @@
"name": "gnome-tweaks",
"_comment": "Lets me put the titlebar buttons on the left"
},
{
"name": "gtk3-devel",
"_comment": "Required for Docker Desktop"
},
{
"name": "guestfs-tools",
"_comment": "Optiional package of Virtualization group"
Expand All @@ -45,8 +37,8 @@
"_comment": "Needed to prompt for PIN for TPM-bound SSH keys"
},
{
"name": "pass",
"_comment": "Required for Docker Desktop"
"name": "docker",
"_comment": "Installs containerd, moby-engine, and runc"
},
{
"name": "powertop",
Expand Down

0 comments on commit dea6367

Please sign in to comment.