Skip to content

Commit

Permalink
fix(wolfi): move bluefin-cli to wolfi (ublue-os#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
castrojo authored and b- committed Dec 9, 2023
1 parent 245e663 commit ec0e63c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 79 deletions.
26 changes: 9 additions & 17 deletions toolboxes/Containerfile.bluefin-cli
Original file line number Diff line number Diff line change
@@ -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="[email protected]"

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
14 changes: 1 addition & 13 deletions toolboxes/Containerfile.wolfi
Original file line number Diff line number Diff line change
@@ -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="[email protected]"

COPY ./toolboxes/packages.wolfi /toolbox-packages
Expand Down
48 changes: 3 additions & 45 deletions toolboxes/packages.bluefin-cli
Original file line number Diff line number Diff line change
@@ -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
33 changes: 29 additions & 4 deletions toolboxes/packages.wolfi
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ec0e63c

Please sign in to comment.