Skip to content

Instantly share code, notes, and snippets.

@reaperes
Last active April 1, 2021 12:06
Show Gist options
  • Save reaperes/77ceb468fbc86f9453fc295998200ad6 to your computer and use it in GitHub Desktop.
Save reaperes/77ceb468fbc86f9453fc295998200ad6 to your computer and use it in GitHub Desktop.
Set docker auth without prompt
AUTH=$(echo -n 'username:password' | base64)
echo $(cat /root/.docker/config.json | jq '. += {
"auths": {
"my.registry.com/v1/": {
"auth": "'"$AUTH"'",
"email": "[email protected]"
}
}
}') > /root/.docker/config.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment