Created
January 25, 2019 11:27
-
-
Save zedtux/429e78c20ff977e4d422c9a6159aad27 to your computer and use it in GitHub Desktop.
Extracts, decodes, updates and encodes the Kubernetes docker-registry secret in order to remove the auths root node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extracts the auths key from the decoded JSON | |
AUTHS=$( | |
echo $GITLAB_REGISTRY_SECRET_JSON | \ | |
jq '.data[".dockerconfigjson"]' -r | \ | |
base64 -d | \ | |
jq '.auths' -c | \ | |
base64 | \ | |
tr -d '\n' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment