How do I deploy to a custom docker registry?
I am setting up a simple go project and I want to build and deploy a simple docker image in my personal 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 plugins are trying to connect and authenticate with the docker registry.
+3
source to share
1 answer
If you are using a custom registry, you need to set the parameter registry
in the plugin configuration [1]. The registry parameter is provided to the docker login command (for example 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/
+5
source to share