3

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.

1 Answers1

6

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/

Brad Rydzewski
  • 2,393
  • 12
  • 16
  • 1
    ...and if your private registry is not secured with TLS you should also add the `insecure: true` parameter to the plugin configuration – mbger Oct 28 '17 at 15:46