From 3b1199d4cba150a442b5caa3e05f44af4c96dbd0 Mon Sep 17 00:00:00 2001 From: "Dan Monaghan (mowglixx)" Date: Tue, 31 Dec 2024 21:14:25 +0000 Subject: [PATCH 1/5] =?UTF-8?q?added=20justfile=20for=20docker=20and=20vsc?= =?UTF-8?q?ode=20layers=20for=20gaming=20devs=20=F0=9F=98=89=20(pre=20-dx?= =?UTF-8?q?=20release=20devmode)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../just/87-bazzite-devcontainers.just | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just new file mode 100644 index 0000000000..8b7161ccb5 --- /dev/null +++ b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just @@ -0,0 +1,32 @@ +# vim: set ft=make : + +# Install Docker, VS Code and add user to relevant groups for docker +install-visual-studio-code: + #!/usr/bin/bash + # check for updates + ublue-update --wait + # add yum repo + echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null + # install layer + rpm-ostree install -y code + echo 'Complete, please reboot to apply changes.' + + +install-docker-ce: + #!/usr/bin/bash + # check for updates + ublue-update --wait + # add yum repo + echo -e "[docker-ce-stable]\nname=Docker CE Stable - $basearch\nbaseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable\nenabled=1\ngpgcheck=1\ngpgkey=https://download.docker.com/linux/fedora/gpg" | sudo tee /etc/yum.repos.d/docker-ce.repo > /dev/null + # install the layer + rpm-ostree install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + # Enable the service + systemctl enable docker + echo 'Complete, please reboot to apply changes.' + +add-user-to-docker-group: + if ! grep -q "^docker:" /etc/group; then + grep '^docker:' /usr/lib/group | sudo tee -a /etc/group > /dev/null + fi + sudo usermod -aG docker $USER + echo 'Complete, please reboot/logout to apply changes.' \ No newline at end of file From 0c9f6d30dc80eb66d005958e3fe5715b9443febc Mon Sep 17 00:00:00 2001 From: "Dan Monaghan (mowglixx)" Date: Tue, 31 Dec 2024 21:37:57 +0000 Subject: [PATCH 2/5] fixed formatting issue --- .../usr/share/ublue-os/just/87-bazzite-devcontainers.just | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just index 8b7161ccb5..2059bf0ef2 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just @@ -11,7 +11,6 @@ install-visual-studio-code: rpm-ostree install -y code echo 'Complete, please reboot to apply changes.' - install-docker-ce: #!/usr/bin/bash # check for updates @@ -25,8 +24,9 @@ install-docker-ce: echo 'Complete, please reboot to apply changes.' add-user-to-docker-group: + #!/usr/bin/bash if ! grep -q "^docker:" /etc/group; then grep '^docker:' /usr/lib/group | sudo tee -a /etc/group > /dev/null fi sudo usermod -aG docker $USER - echo 'Complete, please reboot/logout to apply changes.' \ No newline at end of file + echo 'Complete, please reboot/logout to apply changes.' From 8e0e8ea63dab310c30a9355df5eea9a01e18f38d Mon Sep 17 00:00:00 2001 From: "Dan Monaghan (mowglixx)" Date: Tue, 31 Dec 2024 22:03:15 +0000 Subject: [PATCH 3/5] added socket activation as part of install-docker-ce --- .../usr/share/ublue-os/just/87-bazzite-devcontainers.just | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just index 2059bf0ef2..fefc3d1692 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just @@ -21,6 +21,8 @@ install-docker-ce: rpm-ostree install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Enable the service systemctl enable docker + # Enable the socket + systemctl enable docker.socket echo 'Complete, please reboot to apply changes.' add-user-to-docker-group: From ab4e2b8315b85d2fe415fb08056b9502cfebcf92 Mon Sep 17 00:00:00 2001 From: "Dan Monaghan (mowglixx)" Date: Wed, 1 Jan 2025 18:22:37 +0000 Subject: [PATCH 4/5] added justfile to containerfile --- Containerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Containerfile b/Containerfile index b50ccdf24a..c7f18adf52 100644 --- a/Containerfile +++ b/Containerfile @@ -735,6 +735,7 @@ RUN rm -f /etc/profile.d/toolbox.sh && \ echo "import \"/usr/share/ublue-os/just/84-bazzite-virt.just\"" >> /usr/share/ublue-os/justfile && \ echo "import \"/usr/share/ublue-os/just/85-bazzite-image.just\"" >> /usr/share/ublue-os/justfile && \ echo "import \"/usr/share/ublue-os/just/86-bazzite-windows.just\"" >> /usr/share/ublue-os/justfile && \ + echo "import \"/usr/share/ublue-os/just/87-bazzite-devcontainers.just\"" >> /usr/share/ublue-os/justfile && \ echo "import \"/usr/share/ublue-os/just/90-bazzite-de.just\"" >> /usr/share/ublue-os/justfile && \ if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \ systemctl enable usr-share-sddm-themes.mount && \ From 7d94599e249afce26a92595c16b3290f8327d6f7 Mon Sep 17 00:00:00 2001 From: "Dan Monaghan (mowglixx)" Date: Wed, 1 Jan 2025 19:27:41 +0000 Subject: [PATCH 5/5] escaped "$" chars in docker repo url and name --- .../usr/share/ublue-os/just/87-bazzite-devcontainers.just | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just index fefc3d1692..823ccc860a 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/87-bazzite-devcontainers.just @@ -16,7 +16,7 @@ install-docker-ce: # check for updates ublue-update --wait # add yum repo - echo -e "[docker-ce-stable]\nname=Docker CE Stable - $basearch\nbaseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable\nenabled=1\ngpgcheck=1\ngpgkey=https://download.docker.com/linux/fedora/gpg" | sudo tee /etc/yum.repos.d/docker-ce.repo > /dev/null + echo -e "[docker-ce-stable]\nname=Docker CE Stable - \$basearch\nbaseurl=https://download.docker.com/linux/fedora/\$releasever/\$basearch/stable\nenabled=1\ngpgcheck=1\ngpgkey=https://download.docker.com/linux/fedora/gpg" | sudo tee /etc/yum.repos.d/docker-ce.repo > /dev/null # install the layer rpm-ostree install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Enable the service