mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Support for docker images that set the USER directive. Changes the
docker user to root for the init script to configure the network, then drops to the configured user (or root if one is not defined) for continuing booting the image.
This commit is contained in:
1 parent
dde01317e0
commit
7c3a38d379
2 files changed
+10
-3
No files matched your search
@@ -87,6 +87,9 @@ done
|
||||
ifup -a -f
|
||||
|
||||
# continue normal docker startup
|
||||
PATH="$OLD_PATH"
|
||||
exec "$@"
|
||||
|
||||
GNS3_CMD="PATH=$OLD_PATH exec"
|
||||
while test "$#" -gt 0 ; do
|
||||
GNS3_CMD="${GNS3_CMD} \"${1//\"/\\\"}\""
|
||||
shift
|
||||
done
|
||||
exec su ${GNS3_USER-root} -p -c "$GNS3_CMD"
|
||||
Reference in new issue
Block a user