fix: do not grant "node" user sudo access when using run_in_container.sh

This commit is contained in:
Michael Bolin
2025-04-24 14:15:59 -07:00
parent acc4acc81e
commit 65d1cc097d
2 changed files with 7 additions and 8 deletions

View File

@@ -57,8 +57,8 @@ docker run --name "$CONTAINER_NAME" -d \
codex \
sleep infinity
# Initialize the firewall inside the container.
docker exec "$CONTAINER_NAME" bash -c "sudo /usr/local/bin/init_firewall.sh"
# Initialize the firewall inside the container with root privileges.
docker exec --user root "$CONTAINER_NAME" /usr/local/bin/init_firewall.sh
# Execute the provided command in the container, ensuring it runs in the work directory.
# We use a parameterized bash command to safely handle the command and directory.