From 29306f5da94205e470b056e4f2e7b75344a5b4c9 Mon Sep 17 00:00:00 2001 From: redxef Date: Thu, 10 Mar 2022 14:04:27 +0100 Subject: [PATCH] Change path of docker hub login. --- entrypoint.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index f90d44a..2d63469 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -23,7 +23,10 @@ echo_and_run() { docker_login() { login_name="$1" if [ -z "$login_name" ]; then - login_name=docker.io + login_name="$DEFAULT_DOMAIN" + fi + if [ "$login_name" = "$DEFAULT_DOMAIN" ]; then + login_name="$DEFAULT_DOMAIN/v1" fi # TODO: detect registry url mkdir -p "$HOME/.docker" @@ -102,7 +105,7 @@ if [ -n "$username" ]; then fail "need to also give password when logging in" fi if [ -z "$repository" ]; then - docker_login "$DEFAULT_DOMAIN" + docker_login '' else docker_login "$(split_repo_domain "$repository" | head -n1)" fi