Reputation: 41
I setup a simple go project and I wish to build and deploy a simple docker image to my private registry. This is my .drone.yml:
pipeline:
build:
image: golang
commands:
- go build
docker:
image: plugins/docker
username: xxxxxxxxxxx
password: yyyyyyyyyyy
repo: docker.mycompany.it:5000/drone/test
tags: latest
debug: true
But the plugins tries to connect and authenticate to docker registry.
Upvotes: 4
Views: 2966
Reputation: 2563
If you are using a custom registry you need to set the registry
parameter in the plugin configuration [1]. The registry parameter is provided to the docker login command (e.g. docker login gcr.io
)
Example configuration with custom registry:
pipeline:
docker:
image: plugins/docker
repo: index.company.com/foo/bar
registry: index.company.com
[1] source http://plugins.drone.io/drone-plugins/drone-docker/
Upvotes: 8