]> piware.de Git - bin.git/blob - build-cockpit-toolbox
8af7e61b4ab5f8c46ae9f5775440a90328e06ac9
[bin.git] / build-cockpit-toolbox
1 #!/bin/sh
2 set -eux
3 NAME=${NAME:-cockpit}
4 TAG=${TAG:-latest}
5
6 toolbox rm --force $NAME || true
7 podman pull ghcr.io/cockpit-project/tasks:${TAG}
8 yes | toolbox create --image ghcr.io/cockpit-project/tasks:${TAG} -c $NAME
9
10 # install some extra development and desktop tools
11 toolbox run -c "$NAME" sh -exc '
12 # useful hostname
13 echo "cockpit-toolbox" | sudo tee /etc/hostname
14 sudo hostname -F /etc/hostname
15
16 # enable manpages
17 sudo sed -i s/nodocs// /etc/dnf/dnf.conf
18
19 sudo dnf install -y ansible bash-completion man-db man-pages moreutils fd-find ripgrep gh git-delta neovim \
20     python3-boto python3-boto3 python3-openstacksdk libnotify \
21     simple-scan /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert pdfmerge \
22     cargo rustfmt clippy \
23     calibre qt5-qtwayland \
24     tmt python3-testcloud flatpak-builder flatpak-spawn qemu-ui-sdl \
25     fedpkg centpkg
26
27 # https://bugzilla.redhat.com/show_bug.cgi?id=2281714
28 sudo dnf install -y libglvnd-gles
29
30 # commands to forward to the host
31 for cmd in podman toolbox nmcli eog evince flatpak; do
32     printf "#!/bin/sh\nexec flatpak-spawn --host $cmd \42\$@\42\n" | sudo tee /usr/local/bin/$cmd >/dev/null
33     sudo chmod a+x /usr/local/bin/$cmd
34 done
35 '