mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 15:32:24 +00:00
Preserve docker env in terminal session
This commit is contained in:
parent
fe93b61adb
commit
74ca087c7a
@ -10,5 +10,5 @@ CONTAINER_PID=$($ENGINE inspect --format '{{if .State.Running}}{{.State.Pid}}{{e
|
||||
if [ -z $CONTAINER_PID ]; then
|
||||
read -p "Application must be running for a terminal to be started."
|
||||
else
|
||||
nsenter --target $CONTAINER_PID --mount --uts --ipc --net --pid bash
|
||||
nsenter --target $CONTAINER_PID --mount --uts --ipc --net --pid -- bash -c 'export $(xargs -n 1 -0 < /proc/1/environ); exec bash'
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user