From ec0e63c634dbc0da9627d9025d08cfbd29649725 Mon Sep 17 00:00:00 2001 From: "Jorge O. Castro" Date: Wed, 6 Dec 2023 15:35:53 -0500 Subject: [PATCH] fix(wolfi): move bluefin-cli to wolfi (#717) --- toolboxes/Containerfile.bluefin-cli | 26 ++++++---------- toolboxes/Containerfile.wolfi | 14 +-------- toolboxes/packages.bluefin-cli | 48 ++--------------------------- toolboxes/packages.wolfi | 33 +++++++++++++++++--- 4 files changed, 42 insertions(+), 79 deletions(-) diff --git a/toolboxes/Containerfile.bluefin-cli b/toolboxes/Containerfile.bluefin-cli index 2b82c8b45f7..5869946c343 100644 --- a/toolboxes/Containerfile.bluefin-cli +++ b/toolboxes/Containerfile.bluefin-cli @@ -1,29 +1,21 @@ -FROM ghcr.io/homebrew/brew -# From https://github.com/Homebrew/brew/pkgs/container/brew +FROM ghcr.io/ublue-os/wolfi-toolbox LABEL com.github.containers.toolbox="true" \ usage="This image is meant to be used with the toolbox or distrobox command" \ - summary="The Bluefin Command Line experience" \ + summary="A new cloud-native terminal experience powered by Wolfi and Homebrew" \ maintainer="jorge.castro@gmail.com" COPY ./toolboxes/packages.bluefin-cli /toolbox-packages -COPY ./toolboxes/brew_script.bluefin-cli /etc/profile.d/brew_pkgs.sh -USER root +# Update image +RUN apk update && \ + apk upgrade -RUN apt-get update && \ - apt-get upgrade -y && \ - DEBIAN_FRONTEND=noninteractive apt-get -y install \ - $(cat /toolbox-packages | xargs) && \ - rm -rd /var/lib/apt/lists/* +# Add optional packages +RUN grep -v '^#' /toolbox-packages | xargs apk add RUN rm /toolbox-packages -RUN 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 +# Change root shell to BASH -RUN echo "ALL ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers - -USER linuxbrew +RUN sed -i -e '/^root/s/\/bin\/ash/\/bin\/bash/' /etc/passwd diff --git a/toolboxes/Containerfile.wolfi b/toolboxes/Containerfile.wolfi index e07f1e010a2..1c7241d014d 100644 --- a/toolboxes/Containerfile.wolfi +++ b/toolboxes/Containerfile.wolfi @@ -1,21 +1,9 @@ -# 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 LABEL com.github.containers.toolbox="true" \ usage="This image is meant to be used with the toolbox or distrobox command" \ - summary="A new cloud-native terminal experience powered by Wolfi" \ + summary="A blank Wolfi distrobox, suitable for development" \ maintainer="jorge.castro@gmail.com" COPY ./toolboxes/packages.wolfi /toolbox-packages diff --git a/toolboxes/packages.bluefin-cli b/toolboxes/packages.bluefin-cli index c624e387a7f..d9bd46a6c59 100644 --- a/toolboxes/packages.bluefin-cli +++ b/toolboxes/packages.bluefin-cli @@ -1,47 +1,5 @@ bash -apt-utils -bash-completion -bc -bzip2 -curl -dialog -diffutils -findutils -gnupg -gnupg2 -gpgsm -hostname -iproute2 -iputils-ping -less -locales -lsof -man-db -manpages -ncurses-base -nano -openssh-client -passwd -pigz -pinentry-curses +#brew +git procps -rsync -sudo -tcpdump -time -traceroute -tree -tzdata -unzip -util-linux -wget -xauth -xz-utils -zip -libgl1 -libegl1-mesa -libgl1-mesa-glx -libegl1 -libglx-mesa0 -libvulkan1 -mesa-vulkan-drivers +sudo-rs \ No newline at end of file diff --git a/toolboxes/packages.wolfi b/toolboxes/packages.wolfi index c11b647b90d..f582ccd2a88 100644 --- a/toolboxes/packages.wolfi +++ b/toolboxes/packages.wolfi @@ -1,8 +1,33 @@ bash -ruby-3.3 -git +bzip2 +coreutils curl +diffutils +findmnt +findutils +gnupg +gpg +iproute2 +iputils +keyutils +libcap +mount +ncurses +ncurses-terminfo +net-tools +openssh-client +pigz posix-libc-utils -build-base procps -sudo-rs +rsync +su-exec +tcpdump +tree +tzdata +umount +util-linux +util-linux-misc +wget +xz +zip +vulkan-loader