drone-docker-buildx/DOCS.md

38 lines
1.1 KiB
Markdown
Raw Normal View History

2015-05-15 00:11:26 +00:00
Use the Docker plugin to build and push Docker images to a registry.
2015-09-03 05:14:15 +00:00
The following parameters are used to configure this plugin:
2015-05-15 00:11:26 +00:00
2015-05-15 06:20:26 +00:00
* **registry** - authenticates to this registry
2015-05-15 00:11:26 +00:00
* **username** - authenticates with this username
* **password** - authenticates with this password
* **email** - authenticates with this email
* **repo** - repository name for the image
* **tag** - repository tag for the image
2015-09-03 05:14:15 +00:00
* **insecure** - enable insecure communication to this registry
* **storage_driver** - use `aufs`, `devicemapper`, `btrfs` or `overlay` driver
2015-05-15 00:11:26 +00:00
The following is a sample Docker configuration in your .drone.yml file:
```yaml
2015-10-08 15:54:10 +00:00
publish:
2015-05-15 00:11:26 +00:00
docker:
username: kevinbacon
password: $$DOCKER_PASSWORD
email: kevin.bacon@mail.com
repo: foo/bar
tag: latest
file: Dockerfile
2015-09-03 05:14:15 +00:00
insecure: false
```
You may want to dynamically tag your image. Use the `$$BRANCH`, `$$COMMIT` and `$$BUILD_NUMBER` variables to tag your image with the branch, commit sha or build number:
```yaml
2015-10-08 15:54:10 +00:00
publish:
2015-09-03 05:14:15 +00:00
docker:
username: kevinbacon
password: $$DOCKER_PASSWORD
email: kevin.bacon@mail.com
repo: foo/bar
tag: $$BRANCH
2015-05-15 00:11:26 +00:00
```