🐛 Fix entrypoint when AUTH_REGISTRIES is empty
parent
4e5e75e91d
commit
df8c057855
|
@ -34,6 +34,8 @@ export ALLDOMAINS=${ALLDOMAINS:1} # remove the first comma and export
|
|||
# Now handle the auth part.
|
||||
echo -n "" > /etc/nginx/docker.auth.map
|
||||
|
||||
# Only configure auth registries if the env var contains values
|
||||
if [ "$AUTH_REGISTRIES" ]; then
|
||||
# Ref: https://stackoverflow.com/a/47633817/219530
|
||||
AUTH_REGISTRIES_DELIMITER=${AUTH_REGISTRIES_DELIMITER:-" "}
|
||||
s=$AUTH_REGISTRIES$AUTH_REGISTRIES_DELIMITER
|
||||
|
@ -60,6 +62,7 @@ for ONEREGISTRY in "${auth_array[@]}"; do
|
|||
echo "Adding Auth for registry '${AUTH_HOST}' with user '${AUTH_USER}'."
|
||||
echo "\"${AUTH_HOST}\" \"${AUTH_BASE64}\";" >> /etc/nginx/docker.auth.map
|
||||
done
|
||||
fi
|
||||
|
||||
echo "" > /etc/nginx/docker.verify.ssl.conf
|
||||
if [[ "a${VERIFY_SSL}" == "atrue" ]]; then
|
||||
|
|
Loading…
Reference in New Issue