Registry credentials for downloading private pipeline images are now managed separately from secrets, and are no longer specified in the yaml configuration file.
Example legacy configuration:
pipeline:
build:
image: bradrydzewski/private-image
- auth_config:
- username: bradrydzewski
- password: password
commands:
- go build
- go test
Registry credentials are added to drone using the command line utility:
drone registry add \
--repository=<repo> \
--hostname=docker.io \
--username=<username> \
--password=<password>
Example command:
drone registry add \
--repository=octocat/hello-world \
--hostname=docker.io \
--username=bradrydzewski \
--password=password
Drone matches the registry hostname to each image in your yaml. If the hostnames match the registry credentials are used to authenticate to your registry and pull the image. Note that registry credentials are used by the Drone agent and are never exposed to your build containers.
Example registry hostnames:
- Image
gcr.io/foo/bar
has hostnamegcr.io
- Image
foo/bar
has hostnamedocker.io
- Image
qux.com:8000/foo/bar
has hostnamequx.com:8000
Example registry hostname matching logic:
- Hostname
gcr.io
matches imagegcr.io/foo/bar
- Hostname
docker.io
matchesgolang
- Hostname
docker.io
matcheslibrary/golang
- Hostname
docker.io
matchesbradyrydzewski/golang
- Hostname
docker.io
matchesbradyrydzewski/golang:latest
Is there a mistake on this page? Please let us know or edit this page.