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, or made available from a previous plugin defined on the same step.
The Elastic CI Stack for AWS automatically creates a per-job DOCKER_CONFIG
directory
which is cleaned up after the job. If you are using this plug-in with another agent orchestration
tool, consider whether you need a per-job DOCKER_CONFIG
too.
# environment or pre-command hook
export MY_DOCKER_LOGIN_PASSWORD=mysecretpassword
steps:
- command: ./run_build.sh
plugins:
- docker-login#v2.1.0:
username: myuser
password-env: MY_DOCKER_LOGIN_PASSWORD
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.
Defaults to DOCKER_LOGIN_PASSWORD
.
Retries login after a delay N times. Defaults to 0.
This plugin requires git-bash, not the Windows built-in bash.exe, so you'll need to set your system PATH to have git-bash bin directory first, normallly C:\Program Files\git\bin
.
MIT (see LICENSE)