Skip to content

Instantly share code, notes, and snippets.

@audacioustux
Created November 23, 2023 12:03
Show Gist options
  • Save audacioustux/539fd47eb65facbbfb5a7b22192d85cd to your computer and use it in GitHub Desktop.
Save audacioustux/539fd47eb65facbbfb5a7b22192d85cd to your computer and use it in GitHub Desktop.
local docker_auth=`echo -n ${DOCKER_USERNAME:?}:${DOCKER_TOKEN:?} | base64 -w 0`
local docker_config=`cat <<EOF
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "${docker_auth}"
}
}
}
EOF
`
local docker=`kubectl create secret generic docker-config --from-file=config.json=/dev/stdin --dry-run=client -o yaml <<< "$docker_config"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment