Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy on custom docker registry?

Tags:

drone.io

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.

like image 810
Francesco Boscarino Avatar asked Oct 15 '25 19:10

Francesco Boscarino


1 Answers

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/

like image 75
Brad Rydzewski Avatar answered Oct 19 '25 11:10

Brad Rydzewski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!