adding option to start container docker

This commit is contained in:
AleaJactaEst 2018-07-26 09:35:11 +02:00
parent d607c736e0
commit fa4301a6d9

View file

@ -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 \