refactor: restrict container host access

This commit is contained in:
Job
2025-08-27 21:03:38 +02:00
parent 2f41c16957
commit 27024a0158
3 changed files with 4 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ run_args() {
# container.
[ -e "/run/user/$UID/bus" ] && arg "-v /run/user/$UID/bus:/tmp/bus" # Use host dbus.
arg "-e HOST_HOME=$HOME" # Used to translate container path to host.
arg "-e CONTAINER_NAME=$name"
# Use host networking.
arg "--net=host"
@@ -82,4 +83,4 @@ if [ "$pull" = true ] || [ "$(podman container inspect "$name" -f {{.State.Runni
fi
podman start "$name" 1>/dev/null
podman exec -e CONTAINER_NAME="$name" -e ENTER_DIR="${PWD/#$HOME/\~}" --detach-keys "ctrl-@" -it "$name" bash -l
podman exec -e ENTER_DIR="${PWD/#$HOME/\~}" --detach-keys "ctrl-@" -it "$name" bash -l