Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(toolbox): Cleanup wolfi container. #574

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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