Change path of docker hub login.
This commit is contained in:
parent
9fd0228d87
commit
c7760c4a69
1 changed files with 5 additions and 2 deletions
|
@ -23,7 +23,10 @@ echo_and_run() {
|
||||||
docker_login() {
|
docker_login() {
|
||||||
login_name="$1"
|
login_name="$1"
|
||||||
if [ -z "$login_name" ]; then
|
if [ -z "$login_name" ]; then
|
||||||
login_name=docker.io
|
login_name="$DEFAULT_DOMAIN"
|
||||||
|
fi
|
||||||
|
if [ "$login_name" = "$DEFAULT_DOMAIN" ]; then
|
||||||
|
login_name="$LEGACY_DEFAULT_DOMAIN/v1/"
|
||||||
fi
|
fi
|
||||||
# TODO: detect registry url
|
# TODO: detect registry url
|
||||||
mkdir -p "$HOME/.docker"
|
mkdir -p "$HOME/.docker"
|
||||||
|
@ -102,7 +105,7 @@ if [ -n "$username" ]; then
|
||||||
fail "need to also give password when logging in"
|
fail "need to also give password when logging in"
|
||||||
fi
|
fi
|
||||||
if [ -z "$repository" ]; then
|
if [ -z "$repository" ]; then
|
||||||
docker_login "$DEFAULT_DOMAIN"
|
docker_login ''
|
||||||
else
|
else
|
||||||
docker_login "$(split_repo_domain "$repository" | head -n1)"
|
docker_login "$(split_repo_domain "$repository" | head -n1)"
|
||||||
fi
|
fi
|
||||||
|
|
Reference in a new issue