dk: s'assurer que docker-compose et docker existent quand on crée le service
This commit is contained in:
parent
d70825c296
commit
44b1954a43
14
dk
14
dk
|
@ -267,6 +267,13 @@ function auto_up() {
|
||||||
|
|
||||||
function default_compose_service() {
|
function default_compose_service() {
|
||||||
local docker_compose="$(which docker-compose)"
|
local docker_compose="$(which docker-compose)"
|
||||||
|
if [ -z "$docker_compose" -a -x /usr/bin/docker-compose ]; then
|
||||||
|
docker_compose=/usr/bin/docker-compose
|
||||||
|
elif [ -z "$docker_compose" -a -x /usr/local/bin/docker-compose ]; then
|
||||||
|
docker_compose=/usr/local/bin/docker-compose
|
||||||
|
else
|
||||||
|
die "Impossible de trouver docker-compose"
|
||||||
|
fi
|
||||||
setx startcmd=qvals "$docker_compose" \
|
setx startcmd=qvals "$docker_compose" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
up "${replace_run_args[@]}" "${run_args[@]}" \
|
up "${replace_run_args[@]}" "${run_args[@]}" \
|
||||||
|
@ -275,6 +282,13 @@ function default_compose_service() {
|
||||||
}
|
}
|
||||||
function default_docker_service() {
|
function default_docker_service() {
|
||||||
local docker="$(which docker)"
|
local docker="$(which docker)"
|
||||||
|
if [ -z "$docker" -a -x /usr/bin/docker ]; then
|
||||||
|
docker=/usr/bin/docker
|
||||||
|
elif [ -z "$docker" -a -x /usr/local/bin/docker ]; then
|
||||||
|
docker=/usr/local/bin/docker
|
||||||
|
else
|
||||||
|
die "Impossible de trouver docker"
|
||||||
|
fi
|
||||||
setx startcmd=qvals "$docker" run \
|
setx startcmd=qvals "$docker" run \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
"${replace_run_args[@]}" "${run_args[@]}" \
|
"${replace_run_args[@]}" "${run_args[@]}" \
|
||||||
|
|
Loading…
Reference in New Issue