From 31041443192740984eaed2c0e0ae63278a84d70b Mon Sep 17 00:00:00 2001 From: hirnidrin Date: Mon, 9 Oct 2023 18:48:32 +0200 Subject: [PATCH] fix(toolbox): Cleanup wolfi container. (#574) --- toolboxes/Containerfile.wolfi | 53 +++++++++-------------------------- toolboxes/packages.wolfi | 7 +---- 2 files changed, 15 insertions(+), 45 deletions(-) diff --git a/toolboxes/Containerfile.wolfi b/toolboxes/Containerfile.wolfi index d2a3701f48d..e07f1e010a2 100644 --- a/toolboxes/Containerfile.wolfi +++ b/toolboxes/Containerfile.wolfi @@ -1,3 +1,15 @@ +# Observations 2023-10-09 +# +# * This container does NOT WORK correctly with the current distrobox 1.5.0.2 release, so +# first install the 'next' release (the main branch of the repo) by running +# just distrobox-git +# then close and reopen the terminal before setting up wolfi with +# just distrobox-wolfi +# +# * The initial 'distrobox enter wolfi' command invokes https://github.com/89luca89/distrobox/blob/main/distrobox-init +# which installs many basic packages and distrobox deps (starts at about line 400+). +# So there is no need to pre-install any dependency packages here and possibly induce conflicts. + FROM cgr.dev/chainguard/wolfi-base # Thanks to Nuno do Carmo for the initial prototype @@ -8,50 +20,13 @@ LABEL com.github.containers.toolbox="true" \ COPY ./toolboxes/packages.wolfi /toolbox-packages -# Update image & add dependencies +# Update image RUN apk update && \ apk upgrade -# Add Distrobox specific packages -RUN apk add sudo-rs \ - procps \ - bash \ - bzip2 \ - curl \ - diffutils \ - findmnt \ - findutils \ - git \ - gpg \ - iproute2 \ - iputils \ - keyutils \ - libcap \ - ncurses \ - ncurses-terminfo \ - net-tools \ - openssh-client \ - posix-libc-utils \ - rsync \ - tcpdump \ - tree \ - umount \ - util-linux \ - util-linux-misc \ - wget \ - xz \ - zip - -# Set up dependencies -RUN git clone https://github.com/89luca89/distrobox.git --single-branch /tmp/distrobox && \ - cp /tmp/distrobox/distrobox-host-exec /usr/bin/distrobox-host-exec && \ - wget https://github.com/1player/host-spawn/releases/download/$(cat /tmp/distrobox/distrobox-host-exec | grep host_spawn_version= | cut -d "\"" -f 2)/host-spawn-$(uname -m) -O /usr/bin/host-spawn && \ - chmod +x /usr/bin/host-spawn && \ - rm -rf /tmp/distrobox - # Add optional packages RUN grep -v '^#' /toolbox-packages | xargs apk add - + RUN rm /toolbox-packages # Change root shell to BASH diff --git a/toolboxes/packages.wolfi b/toolboxes/packages.wolfi index a4d7830b64d..7ecd9127b52 100644 --- a/toolboxes/packages.wolfi +++ b/toolboxes/packages.wolfi @@ -1,7 +1,2 @@ -apk-tools -bash -curl git -posix-libc-utils -su-exec -vim +nano