profils pour docker-machine

This commit is contained in:
Jephté Clain 2018-11-16 16:25:33 +04:00
parent a9004fa1d2
commit 45c6422e62
2 changed files with 15 additions and 0 deletions

12
dk
View File

@ -280,9 +280,21 @@ function auto_down() {
DEFAULT_PROFILE=devel
PROFILE=
DM_PROFILES=()
set_defaults dk
export PROFILE
if progexists docker-machine; then
setx active_dm=docker-machine active
for dm_profile in "${DM_PROFILES[@]}"; do
splitpair "$dm_profile" dm profile
if [ "$dm" == "$active_dm" ]; then
DEFAULT_PROFILE="$profile"
break
fi
done
fi
chdir=
args=(
--help '$exit_with display_help'

View File

@ -2,3 +2,6 @@
# Profil par défaut
#PROFILE=prod
# Profiles pour docker-machine
#DM_PROFILES=(name:profile...)