Skip to content

Commit

Permalink
feat(bluefin-cli): introduce .brew_pkgs (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobslept authored Dec 2, 2023
1 parent a1d6176 commit fdd27e5
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 3 deletions.
10 changes: 10 additions & 0 deletions just/custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ aqua:
printf '\n export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"\n'
printf '\n=> see https://aquaproj.github.io/docs/tutorial for more info\n'

[private]
bluefin-cli:
#!/usr/bin/env bash
if [ ! -f "${HOME}/.brew_pkgs" ]; then
echo dysk > "${HOME}/.brew_pkgs"
fi;
distrobox-create --nvidia --image ghcr.io/ublue-os/bluefin-cli:latest -n bluefin-cli -Y -a "--env BREW_PKGS=.brew_pkgs"
echo "Entering bluefin-cli"
distrobox enter bluefin-cli

# Enable Cockpit for web-based system management | https://cockpit-project.org/
cockpit:
echo 'Enabling Cockpit'
Expand Down
5 changes: 3 additions & 2 deletions toolboxes/Containerfile.bluefin-cli
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
FROM ghcr.io/homebrew/brew
# From https://github.com/toolbx-images/images/tree/main/ubuntu/22.04
# From https://github.com/Homebrew/brew/pkgs/container/brew

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" \
maintainer="jorge.castro@gmail.com"

COPY ./toolboxes/packages.bluefin-cli /toolbox-packages
COPY ./toolboxes/brew_script.bluefin-cli /etc/profiles.d/brew_pkgs.sh

USER root

RUN apt-get update && \
apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get -y install \
$(cat toolbox-packages | xargs) && \
$(cat /toolbox-packages | xargs) && \
rm -rd /var/lib/apt/lists/*

RUN rm /toolbox-packages
Expand Down
8 changes: 8 additions & 0 deletions toolboxes/brew_script.bluefin-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ ! -f /home/linuxbrew/.firstrun ]; then
touch /home/linuxbrew/.firstrun
# `brew update-reset` is currently needed
# because somekind of issue with brew
brew update-reset
xargs brew install < "${HOME}"/"${BREW_PKGS}"
fi
48 changes: 47 additions & 1 deletion toolboxes/packages.bluefin-cli
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
# Do we need anything in here?
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
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

0 comments on commit fdd27e5

Please sign in to comment.