Skip to content

Commit

Permalink
fix(toolbox): Cleanup wolfi container. (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirnidrin authored Oct 9, 2023
1 parent 04e8a08 commit 3104144
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 45 deletions.
53 changes: 14 additions & 39 deletions toolboxes/Containerfile.wolfi
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
7 changes: 1 addition & 6 deletions toolboxes/packages.wolfi
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
apk-tools
bash
curl
git
posix-libc-utils
su-exec
vim
nano

0 comments on commit 3104144

Please sign in to comment.