A Buildkite plugin to login to docker registries.
To avoid leaking your docker password to buildkite.com or anyone with access to build logs, you need to avoid including it in pipeline.yml. This means it needs to be set specifically with an environment variable in an Agent hook, for instance the environment hook.
The examples below show how to provide passwords for single and multiple registries.
# environment or pre-command hook
export BUILDKITE_PLUGIN_DOCKER_LOGIN_PASSWORD=mysecretpassword
steps:
- command: ./run_build.sh
plugins:
docker-login#v1.0.0:
username: myuser
# environment or pre-command hook
export BUILDKITE_PLUGIN_DOCKER_LOGIN_PASSWORD_0=mysecretpassword1
export BUILDKITE_PLUGIN_DOCKER_LOGIN_PASSWORD_1=mysecretpassword2
steps:
- command: ./run_build.sh
plugins:
docker-login#v1.0.0:
- server: my.private.registry
username: myuser
- server: another.private.registry
username: myuser
The username to send to the docker registry.
The server to log in to, if blank or ommitted logs into Docker Hub.
MIT (see LICENSE)