Skip to content

Commit

Permalink
Fix Docker authentication checks (#187)
Browse files Browse the repository at this point in the history
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/DocSpace-buildtools/pulls/187
Co-authored-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
Co-committed-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
  • Loading branch information
isboston authored and evgeniy-antonyuk committed Mar 3, 2025
1 parent e445cb1 commit e780d30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion install/OneClickInstall/install-Docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -903,14 +903,17 @@ docker_login() {
return 0
fi

[[ -n "$HUB" ]] && return 0

if [[ "$NON_INTERACTIVE" == "true" ]]; then
[[ -z "$USERNAME" || -z "$PASSWORD" ]] && return 0
else
echo "Please log in: Docker Hub limits to 10 pulls."
[[ -z "$USERNAME" ]] && read -rp "Enter DockerHub username: " USERNAME
[[ -z "$PASSWORD" ]] && read -rsp "Enter DockerHub password: " PASSWORD && echo
fi

echo "$PASSWORD" | docker login "${HUB}" --username "$USERNAME" --password-stdin || { echo "Docker authentication failed"; exit 1; }
echo "$PASSWORD" | docker login --username "$USERNAME" --password-stdin || { echo "Docker authentication failed"; exit 1; }
}

create_network () {
Expand Down

0 comments on commit e780d30

Please sign in to comment.