Docker Login Buildkite Plugin
A Buildkite plugin to login to docker registries.
Securing your password
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.
Example: Login to docker hub (or a single server)
# environment or pre-command hook export DOCKER_LOGIN_PASSWORD=mysecretpassword
steps: - command: ./run_build.sh plugins: - docker-login#v2.0.1: username: myuser password-env: DOCKER_LOGIN_PASSWORD
Example: Log in to multiple registries
# environment or pre-command hook export DOCKER_LOGIN_MY_PRIVATE_REGISTRY=mysecretpassword1 export DOCKER_LOGIN_ANOTHER_REGISTRY=mysecretpassword2
steps: - command: ./run_build.sh plugins: - docker-login#v2.0.1: - server: my.private.registry username: myuser password-env: DOCKER_LOGIN_MY_PRIVATE_REGISTRY - server: another.private.registry username: myuser password-env: DOCKER_LOGIN_ANOTHER_REGISTRY
The username to send to the docker registry.
The server to log in to, if blank or ommitted logs into Docker Hub.
The environment variable that the password is stored in
MIT (see LICENSE)