Skip to content

Commit

Permalink
Merge pull request #126 from p4p4j0hn/p4p4j0hn/move-fedora-distrobox
Browse files Browse the repository at this point in the history
chore(fedora): Consolidate distrobox and toolbox images
  • Loading branch information
castrojo authored Nov 16, 2024
2 parents a835c7e + 7b5ba3f commit 5b026e0
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 5 deletions.
38 changes: 33 additions & 5 deletions toolboxes/fedora-toolbox/Containerfile.fedora
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
FROM ghcr.io/ublue-os/fedora-distrobox:latest
# From https://github.com/ublue-os/fedora-distrobox
FROM registry.fedoraproject.org/fedora-toolbox:41 AS fedora-toolbox

LABEL com.github.containers.toolbox="true" \
usage="This image is meant to be used with the toolbox or distrobox command" \
summary="A cloud-native terminal experience powered by Fedora"

COPY ./toolboxes/fedora-toolbox/packages.fedora /toolbox-packages
COPY ./toolboxes/fedora-toolbox/packages.fedora /tmp/toolbox-packages

RUN dnf -y upgrade && \
dnf -y install $(<toolbox-packages) && \
dnf -y install $(<tmp/toolbox-packages) && \
dnf clean all

RUN rm /toolbox-packages
# 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 -drf /tmp/distrobox && \
dnf install -y 'dnf-command(copr)' && \
dnf clean all

# Set up cleaner Distrobox integration
RUN dnf copr enable -y kylegospo/distrobox-utils && \
dnf install -y \
xdg-utils-distrobox \
adw-gtk3-theme && \
ln -s /usr/bin/distrobox-host-exec /usr/bin/flatpak && \
dnf clean all

# Install RPMFusion for hardware accelerated encoding/decoding
RUN dnf install -y \
"https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm" \
"https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm" && \
dnf install -y \
intel-media-driver \
nvidia-vaapi-driver && \
dnf swap -y mesa-va-drivers mesa-va-drivers-freeworld && \
dnf swap -y mesa-vdpau-drivers mesa-vdpau-drivers-freeworld && \
dnf clean all

# Cleanup
RUN rm -rf /tmp/*
53 changes: 53 additions & 0 deletions toolboxes/fedora-toolbox/packages.fedora
Original file line number Diff line number Diff line change
@@ -1,2 +1,55 @@
dnf5
bash-completion
bc
bzip2
curl
diffutils
dnf-plugins-core
findutils
fish
glibc-all-langpacks
glibc-locale-source
gnupg2
gnupg2-smime
hostname
iproute
iputils
keyutils
krb5-libs
less
lsof
man-db
man-pages
mtr
ncurses
nss-mdns
openssh-clients
pam
passwd
pigz
pinentry
procps-ng
rsync
shadow-utils
sudo
tcpdump
time
traceroute
tree
tzdata
unzip
util-linux
vte-profile
wget
which
whois
words
xorg-x11-xauth
xz
zip
mesa-dri-drivers
mesa-vulkan-drivers
vulkan
zsh
vim
ripgrep

0 comments on commit 5b026e0

Please sign in to comment.