From 24dc96a0f8d3bbc069dbb0ad57c55373590e8aa2 Mon Sep 17 00:00:00 2001 From: Justin Garrison Date: Tue, 10 Dec 2024 15:44:15 -0800 Subject: [PATCH 1/2] fix: Actually build debian toolbox from debian --- toolboxes/debian-toolbox/Containerfile.debian | 52 +++++++++---------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/toolboxes/debian-toolbox/Containerfile.debian b/toolboxes/debian-toolbox/Containerfile.debian index d7494e9..48bbeae 100644 --- a/toolboxes/debian-toolbox/Containerfile.debian +++ b/toolboxes/debian-toolbox/Containerfile.debian @@ -1,32 +1,30 @@ -FROM docker.io/library/ubuntu:24.04 -# FROM https://hub.docker.com/_/ubuntu +FROM docker.io/library/debian:bookworm +# FROM https://hub.docker.com/_/debian LABEL com.github.containers.toolbox="true" \ - name="ubuntu-toolbox" \ - usage="This image is meant to be used with the toolbox or distrobox command" \ - summary="A cloud-native terminal experience powered by Ubuntu" \ - maintainer="jorge.castro@gmail.com" + name="debian-toolbox" \ + usage="This image is meant to be used with the toolbox or distrobox command" \ + summary="A cloud-native terminal experience powered by Debian" \ + maintainer="justin@linux.com" -COPY ./toolboxes/ubuntu-toolbox/packages.ubuntu /toolbox-packages +COPY ./toolboxes/debian-toolbox/packages.debian /toolbox-packages RUN rm /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-languages && \ - sed -Ei 's/^(hosts:.*)(\)\s*(.*)/\1\2 myhostname \3/' /etc/nsswitch.conf && \ - apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y install \ - ubuntu-minimal ubuntu-standard \ - libnss-myhostname \ - flatpak-xdg-utils \ - $(cat toolbox-packages | xargs) && \ - rm -rd /var/lib/apt/lists/* && \ - rm /toolbox-packages && \ - mkdir /usr/share/empty && \ - userdel --remove ubuntu && \ - curl -sLo /usr/bin/host-spawn https://github.com/1player/host-spawn/releases/download/1.5.0/host-spawn-x86_64 && \ - chmod +x /usr/bin/host-spawn && \ - rm /etc/apt/apt.conf.d/20apt-esm-hook.conf && \ - ln -s /usr/libexec/flatpak-xdg-utils/flatpak-spawn /usr/bin/ && \ - ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \ - ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \ - ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/podman && \ - ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree && \ - echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers + sed -Ei 's/^(hosts:.*)(\)\s*(.*)/\1\2 myhostname \3/' /etc/nsswitch.conf && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get -y install \ + libnss-myhostname \ + flatpak-xdg-utils \ + $(cat toolbox-packages | xargs) && \ + rm -rd /var/lib/apt/lists/* && \ + rm /toolbox-packages && \ + mkdir /usr/share/empty && \ + curl -sLo /usr/bin/host-spawn https://github.com/1player/host-spawn/releases/download/1.5.0/host-spawn-x86_64 && \ + chmod +x /usr/bin/host-spawn && \ + rm /etc/apt/apt.conf.d/20apt-esm-hook.conf && \ + ln -s /usr/libexec/flatpak-xdg-utils/flatpak-spawn /usr/bin/ && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/podman && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree && \ + echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers From 28c6827018615a12934df4505da8c1603a54b471 Mon Sep 17 00:00:00 2001 From: Justin Garrison Date: Tue, 10 Dec 2024 16:26:32 -0800 Subject: [PATCH 2/2] fix: remove missing apt config --- toolboxes/debian-toolbox/Containerfile.debian | 1 - 1 file changed, 1 deletion(-) diff --git a/toolboxes/debian-toolbox/Containerfile.debian b/toolboxes/debian-toolbox/Containerfile.debian index 48bbeae..ac52691 100644 --- a/toolboxes/debian-toolbox/Containerfile.debian +++ b/toolboxes/debian-toolbox/Containerfile.debian @@ -21,7 +21,6 @@ RUN rm /etc/apt/apt.conf.d/docker-gzip-indexes /etc/apt/apt.conf.d/docker-no-lan mkdir /usr/share/empty && \ curl -sLo /usr/bin/host-spawn https://github.com/1player/host-spawn/releases/download/1.5.0/host-spawn-x86_64 && \ chmod +x /usr/bin/host-spawn && \ - rm /etc/apt/apt.conf.d/20apt-esm-hook.conf && \ ln -s /usr/libexec/flatpak-xdg-utils/flatpak-spawn /usr/bin/ && \ ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \ ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \