Use copr for Ghostty, remove sudo from shell script

This commit is contained in:
Jonathan Cremin 2025-05-17 17:51:58 +01:00
parent 64fc11fc58
commit 6a44899aff
2 changed files with 65 additions and 65 deletions

View file

@ -3,62 +3,63 @@ FROM ghcr.io/ublue-os/silverblue-main:42
COPY etc /etc
RUN dnf install -y https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm && \
dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
dnf clean all
dnf install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm && \
dnf clean all
RUN dnf remove -y \
ptyxis \
gnome-software \
htop \
gnome-classic-session \
gnome-shell-extension-apps-menu \
gnome-shell-extension-background-logo \
gnome-shell-extension-launch-new-instance \
gnome-shell-extension-places-menu \
gnome-shell-extension-window-list \
open-vm-tools \
open-vm-tools-desktop \
qemu-guest-agent \
spice-vdagent \
spice-webdavd \
virtualbox-guest-additions && \
dnf swap -y ffmpeg-free ffmpeg --allowerasing && \
dnf swap -y libavcodec-free libavcodec-freeworld --allowerasing && \
dnf group install -y multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin && \
dnf copr enable -y alternateved/eza && \
dnf install -y \
acpi \
akmod-v4l2loopback \
btop \
direnv \
distrobox \
eza \
git \
gnome-boxes \
gstreamer1-vaapi \
helm \
kubectl \
util-linux \
lm_sensors \
ncdu \
pavucontrol \
qemu-guest-agent \
sysstat \
tailscale \
vdpauinfo \
vulkan-tools \
zsh \
zsh-syntax-highlighting && \
# Clean up
dnf clean all
ptyxis \
gnome-software \
htop \
gnome-classic-session \
gnome-shell-extension-apps-menu \
gnome-shell-extension-background-logo \
gnome-shell-extension-launch-new-instance \
gnome-shell-extension-places-menu \
gnome-shell-extension-window-list \
open-vm-tools \
open-vm-tools-desktop \
qemu-guest-agent \
spice-vdagent \
spice-webdavd \
virtualbox-guest-additions && \
dnf swap -y ffmpeg-free ffmpeg --allowerasing && \
dnf swap -y libavcodec-free libavcodec-freeworld --allowerasing && \
dnf remove -y pipewire-libs-extra && \
dnf group install -y multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin --allowerasing && \
dnf copr enable -y alternateved/eza && \
dnf copr enable -y pgdev/ghostty && \
dnf install -y \
acpi \
akmod-v4l2loopback \
btop \
direnv \
dmidecode \
eza \
ffmpegthumbnailer \
ghostty \
git \
gnome-boxes \
gstreamer1-vaapi \
helm \
kubectl \
lm_sensors \
lshw \
nmcli \
mpv \
ncdu \
pavucontrol \
sysstat \
tailscale \
vdpauinfo \
vulkan-tools \
zsh \
zsh-syntax-highlighting && \
# Clean up
dnf clean all
# Remove btop and nvtop shortcuts
RUN rm /usr/share/applications/btop.desktop /usr/share/applications/nvtop.desktop
# Don't use the ghostty copr for now, it's broken on 42. Download the appimage in userland.
# Todo: Try again when 42 is final.
# RUN dnf copr enable -y pgdev/ghostty && \
# dnf install -y ghostty
# Don't install 1password, the browser integration breaks because 1Password uses /opt.
# I think this is polkit related.
@ -69,11 +70,10 @@ RUN rm /usr/share/applications/btop.desktop /usr/share/applications/nvtop.deskto
RUN authselect enable-feature with-fingerprint
LABEL org.opencontainers.image.description="Built on ublue-os/silverblue-main, adding more batteries" \
org.opencontainers.image.source="https://cremin.dev/jonathan/bootc" \
org.opencontainers.image.title="ublue-silverblue-main" \
org.opencontainers.image.url="https://cremin.dev/jonathan/bootc" \
org.opencontainers.image.created="" \
org.opencontainers.image.licenses="Unlicensed" \
org.opencontainers.image.revision="" \
org.opencontainers.image.version=""
org.opencontainers.image.source="https://cremin.dev/jonathan/bootc" \
org.opencontainers.image.title="ublue-silverblue-main" \
org.opencontainers.image.url="https://cremin.dev/jonathan/bootc" \
org.opencontainers.image.created="" \
org.opencontainers.image.licenses="Unlicensed" \
org.opencontainers.image.revision="" \
org.opencontainers.image.version=""

View file

@ -11,10 +11,10 @@ CURRENT_IMAGE_ID=$(sudo podman images --format "{{.ID}}" cremin.dev/jonathan/ubl
echo "Pulling base image"
# ensure the base image is up to date
sudo -E podman pull ghcr.io/ublue-os/silverblue-main:42
podman pull ghcr.io/ublue-os/silverblue-main:42
echo "Starting build"
sudo -E podman build -t cremin.dev/jonathan/ublue-silverblue-main:42 .
podman build -t cremin.dev/jonathan/ublue-silverblue-main:42 .
NEW_IMAGE_ID=$(sudo podman images --format "{{.ID}}" cremin.dev/jonathan/ublue-silverblue-main:42)
@ -25,9 +25,9 @@ if [ "$CURRENT_IMAGE_ID" = "$NEW_IMAGE_ID" ]; then
else
echo "Image updated, pushing to registry"
# Add the tags
sudo -E podman tag cremin.dev/jonathan/ublue-silverblue-main:42 cremin.dev/jonathan/ublue-silverblue-main:42-${DATE_TAG} cremin.dev/jonathan/ublue-silverblue-main:latest
podman tag cremin.dev/jonathan/ublue-silverblue-main:42 cremin.dev/jonathan/ublue-silverblue-main:42-${DATE_TAG} cremin.dev/jonathan/ublue-silverblue-main:latest
# Push the image
sudo -E podman push --authfile ~/.config/containers/auth.json cremin.dev/jonathan/ublue-silverblue-main:42-${DATE_TAG}
sudo -E podman push --authfile ~/.config/containers/auth.json cremin.dev/jonathan/ublue-silverblue-main:42
sudo -E podman push --authfile ~/.config/containers/auth.json cremin.dev/jonathan/ublue-silverblue-main:latest
fi
podman push --authfile ~/.config/containers/auth.json cremin.dev/jonathan/ublue-silverblue-main:42-${DATE_TAG}
podman push --authfile ~/.config/containers/auth.json cremin.dev/jonathan/ublue-silverblue-main:42
podman push --authfile ~/.config/containers/auth.json cremin.dev/jonathan/ublue-silverblue-main:latest
fi