File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
.github/actions/bootc-ubuntu-setup Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 1- 5a0900533a2b015c83b81e21f1ef78c6f7ad6067
1+ e15b9622fcef58276464960124823108858dc646
Original file line number Diff line number Diff line change 1313 },
1414 "features" : {},
1515 "runArgs" : [
16- // Because we want to be able to run podman and also use e.g. /dev/kvm
17- // among other things
18- " --privileged"
16+ // Minimal security options for nested podman (avoids --privileged):
17+ // - label=disable: Required for mounting /proc in nested user namespace
18+ // - unmask=/proc/*: Allows access to /proc paths needed for nested containers
19+ " --security-opt" , " label=disable" ,
20+ " --security-opt" , " unmask=/proc/*" ,
21+ // Device access for nested containers and VMs
22+ " --device" , " /dev/net/tun" ,
23+ " --device" , " /dev/kvm"
1924 ],
2025 "postCreateCommand" : {
2126 // Our init script
Original file line number Diff line number Diff line change 1414 run : |
1515 set -xeuo pipefail
1616 sudo df -h
17- unwanted_pkgs=('^aspnetcore-.*' '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*' '^mysql-.*'
17+ # Use globs for package patterns (apt and dpkg both support fnmatch globs)
18+ unwanted_pkgs=('aspnetcore-*' 'dotnet-*' 'llvm-*' 'php*' 'mongodb-*' 'mysql-*'
1819 azure-cli google-chrome-stable firefox mono-devel)
1920 unwanted_dirs=(/usr/share/dotnet /opt/ghc /usr/local/lib/android /opt/hostedtoolcache/CodeQL)
2021 # Start background removal operations as systemd units; if this causes
3031 for x in ${unwanted_dirs[@]}; do
3132 runcleanup rm -rf "$x"
3233 done
33- # Apt removals in foreground, as we can't parallelize these
34+ # Apt removals in foreground, as we can't parallelize these.
35+ # Only attempt removal if matching packages are installed.
3436 for x in ${unwanted_pkgs[@]}; do
35- /bin/time -f '%E %C' sudo apt-get remove -y $x
37+ if dpkg -l "$x" >/dev/null 2>&1; then
38+ /bin/time -f '%E %C' sudo apt-get remove -y "$x"
39+ fi
3640 done
3741 # We really want support for heredocs
3842 - name : Update podman and install just
You can’t perform that action at this time.
0 commit comments