Skip to content

Instantly share code, notes, and snippets.

@daviddyball
Last active August 29, 2015 14:05
Show Gist options
  • Save daviddyball/3a70b05470d2c2677fd8 to your computer and use it in GitHub Desktop.
Save daviddyball/3a70b05470d2c2677fd8 to your computer and use it in GitHub Desktop.
Yaml configuration for drone docker-plugin
deploy:
docker:
docker_file: Dockerfiles/staging // Optional. Defaults to ./Dockerfile
docker_server: 192.168.125.10 // Required
docker__port: 5672 // Optional. Defaults to 2375
registry_host: docker.mycompany.com // Optional. If missing will push to index.docker.io
registry_protocol: https // Optional. Defaults to http
registry_port: 443 // Optional.
registry_login_uri: /somewhere/random/v1/ // Optional. Defaults to /v1/ (some people override it)
registry_login: true // Defaults to False. Must be True for index.docker.io
username: myuser // Optional.
password: password // Optional.
email: [email protected] // Optional.
image_base_name: myimage // Required.
branch: master
deploy:
docker:
registry_url: https://docker.mycompany.com/somewhere/random/v1/
registry_username: myuser
registry_password: password
registry_email: [email protected]
image_base_name: myimage
@daviddyball
Copy link
Author

When you push to a remote private docker registry, sometimes you have to login first with something like:

docker login -u (user) -p (password) -e (email) (http|https)://{registry_host}(|:optional_port)/(login_uri)/

e.g.

docker login -u myuser -p secretpassword -e [email protected] https://myregistry.company.com:5000/v1/

docker_publish_yaml_v1 allows you to set each bit specifically, but can be long-winded.
docker_publish_yaml_v2 would require some heavy text munging to extract any parts from the registry url. Cleaner for config, but could get messy in extra code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment