Merge pull request #8268 from dokku/5324-login-to-registry-per-app

Add the ability to log into a registry on a per-app basis
This commit is contained in:
Jose Diaz-Gonzalez
2026-01-10 08:48:16 -05:00
committed by GitHub
25 changed files with 419 additions and 34 deletions

View File

@@ -947,3 +947,14 @@ fn-migrate-config-to-property() {
fi
done
}
fn-registry-docker-config-dir() {
declare desc="returns docker config file path if per-app registry credentials exist"
declare APP="$1"
local config_dir="/var/lib/dokku/config/registry/$APP"
local config_file="$config_dir/config.json"
if [[ -f "$config_file" ]] && [[ "$(jq -r '.auths | length' "$config_file" 2>/dev/null)" != "0" ]]; then
echo "$config_dir"
fi
}