File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ composer_dir="-v ${COMPOSER_DIR}:/home/app/.composer"
99directory=" $( pwd) "
1010extra_hosts=" ${EXTRA_HOSTS} "
1111hosts=" "
12+ tty=" -t"
1213name=" php-docker-project-cli"
1314network=" "
1415no_cache=" "
@@ -38,6 +39,7 @@ Options:
3839 --build Build image from Dockerfile.
3940 --network NAME Name of network to connect the container to, e.g. traefik_webgateway.
4041 --no-cache Do not use cache when building the image.
42+ --no-tty Do not allocate a pseudo-TTY.
4143 --project-directory PATH Alternative working directory, default is current directory.
4244 --ssh-keys Mount user ssh directory."
4345 exit
@@ -65,6 +67,9 @@ for ((i=0; i < "$#"; ++i)); do
6567 --ssh-keys ) ssh_dir=" -v ${HOME} /.ssh:/home/app/.ssh"
6668 unset " args[i]"
6769 ;;
70+ --no-tty ) tty=" "
71+ unset " args[i]"
72+ ;;
6873 esac
6974done
7075
@@ -120,4 +125,4 @@ if [[ -z "${hosts}" ]] && [[ -n "${extra_hosts}" ]]; then
120125 done
121126fi
122127
123- docker run -it --rm --name " ${name} " ${hosts} -v " ${volume} " ${network} ${ssh_dir} ${composer_dir} -w " ${work_dir} " -u " ${user} " " ${image} " ${cmd} " ${args[@]} "
128+ docker run -i ${tty} --rm --name " ${name} " ${hosts} -v " ${volume} " ${network} ${ssh_dir} ${composer_dir} -w " ${work_dir} " -u " ${user} " " ${image} " ${cmd} " ${args[@]} "
You can’t perform that action at this time.
0 commit comments