]> piware.de Git - bin.git/blob - build-cockpit-toolbox
build-cockpit-toolbox: tasks container moved to ghcr.io
[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 python3-pytest-asyncio libnotify \
21     python3-mypy \
22     simple-scan /usr/bin/scanimage /usr/bin/pngquant /usr/bin/convert pdfmerge \
23     cargo rustfmt clippy \
24     calibre qt5-qtwayland \
25     dbus-daemon tmt tmt-provision-virtual flatpak-builder flatpak-spawn \
26     fedpkg centpkg
27
28 # commands to forward to the host
29 for cmd in podman toolbox nmcli eog evince; do
30     printf "#!/bin/sh\nexec flatpak-spawn --host $cmd \42\$@\42\n" | sudo tee /usr/local/bin/$cmd >/dev/null
31     sudo chmod a+x /usr/local/bin/$cmd
32 done
33 '