From fa4301a6d93ffed2485e1bd5c555baa15bfa52c8 Mon Sep 17 00:00:00 2001 From: AleaJactaEst Date: Thu, 26 Jul 2018 09:35:11 +0200 Subject: [PATCH] adding option to start container docker --- server/debian/stretch/x86_64/server-container.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/debian/stretch/x86_64/server-container.sh b/server/debian/stretch/x86_64/server-container.sh index 114a872..e4028a3 100755 --- a/server/debian/stretch/x86_64/server-container.sh +++ b/server/debian/stretch/x86_64/server-container.sh @@ -36,6 +36,7 @@ declare -i SHOWIPKHANATSERVER=0 declare METHODSTARTSERVER="--start-khanat-with-screen" declare -i CLEANIMAGENONE=0 declare DOCKERBUILDOPT="" +declare DOCKERRUNOPT="" declare CONFIGUREAUTO="" declare UPDATEAUTO="" @@ -81,6 +82,7 @@ options: -w, --clean-images-none : Remove images docker (with name 'none') -i, --show-ip-khanat-server : show ip address for khanat server (launch under docker) --option-docker-build=[STRING] : you can add option in "docker build" + --option-docker-run=[STRING] : you can add option in "docker run" --khanat-ressources-dir=[DIR] : localization khanat-ressources --khanat-client-data-dir=[DIR] : localization khanat-client-data --opennel-code-dir=[DIR] : localization opennel-code @@ -238,6 +240,10 @@ do DOCKERBUILDOPT="$DOCKERBUILDOPT ${1#*=}" shift ;; + --option-docker-run=*) + DOCKERRUNOPT="$DOCKERRUNOPT ${1#*=}" + shift + ;; *) msg_error "[$(basename $0):$LINENO] options '$1' not recognize" usage @@ -522,7 +528,7 @@ fi if [[ $LAUNCHKHANAT -ne 0 ]] then msg_info "[$(basename $0):$LINENO] START KHANAT SERVER" - cd $rootdir; docker run -it --hostname=khanat \ + cd $rootdir; docker run -it $DOCKERRUNOPT --hostname=khanat \ -u "$(id -u $USERNAME):$(id -g $USERNAME)" \ -v /etc/localtime:/etc/localtime:ro \ -v ${rootdir}/${LOCALBUILDDIR}/bin:/usr/local/bin:ro \