Go to file
Robert Kaussow 3fd42b869c
docs: add parameter documentation (#26)
2021-09-11 12:02:03 +02:00
.chglog chore: improve generated changelog (#18) 2021-05-09 23:46:14 +02:00
.github disable require branches to be up to date 2021-05-25 17:44:01 +02:00
cmd/drone-docker docs: add parameter documentation (#26) 2021-09-11 12:02:03 +02:00
docker chore(deps): update docker digests 2021-07-21 20:35:33 +00:00
plugin docs: add parameter documentation (#26) 2021-09-11 12:02:03 +02:00
.drone.jsonnet chore: update build env to golang 1.16 (#19) 2021-05-10 09:03:35 +02:00
.drone.yml chore: update build env to golang 1.16 (#19) 2021-05-10 09:03:35 +02:00
.gitignore ci: auto-generate changelog (#7) 2021-02-15 20:52:53 +01:00
.prettierignore chore: improve generated changelog (#18) 2021-05-09 23:46:14 +02:00
CONTRIBUTING.md add missing CONTRIBUTING.md file 2021-01-17 20:38:29 +01:00
LICENSE fork: initial commit 2021-01-17 13:06:23 +01:00
README.md docs: add parameter documentation (#26) 2021-09-11 12:02:03 +02:00
go.mod fix(deps): update module honnef.co/go/tools to v0.2.1 (#25) 2021-08-23 20:57:53 +02:00
go.sum fix(deps): update module honnef.co/go/tools to v0.2.1 (#25) 2021-08-23 20:57:53 +02:00
renovate.json fork: initial commit 2021-01-17 13:06:23 +01:00

README.md

drone-docker

Drone plugin to build multiarch Docker images

Build Status Docker Hub Quay.io Go Report Card GitHub contributors Source: GitHub License: MIT

Drone plugin to build multiarch Docker images. This plugin is a fork of drone-plugins/drone-docker.

Docker Tags

Tags are following the main Docker version e.g. 19.03, the second part is reflecting the plugin "version". A full example would be 19.03.5.

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/drone-docker

Build the Docker image with the following command:

docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-docker .

Usage

Notice: Be aware that the tis plugin requires privileged capabilities, otherwise the integrated Docker daemon is not able to start.

docker run --rm \
  -e PLUGIN_TAG=latest \
  -e PLUGIN_REPO=octocat/hello-world \
  -e DRONE_COMMIT_SHA=00000000 \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  --privileged \
  thegeeklab/drone-docker --dry-run

Parameters

dry_run
disables docker push
drone_remote_url
sets the git remote url
mirror
sets a registry mirror to pull images
storage_driver
sets the docker daemon storage driver
storage_path (default /var/lib/docker)
sets the docker daemon storage path
bip
allows the docker daemon to bride ip address
mtu
sets docker daemon custom mtu setting
custom_dns
sets custom docker daemon dns server
custom_dns_search
sets custom docker daemon dns search domain
insecure
allows the docker daemon to use insecure registries
ipv6
enables docker daemon ipv6 support
experimental
enables docker daemon experimental mode
debug "docker_launch_debug
enables verbose debug mode for the docker daemon
daemon_off
disables the startup of the docker daemon
dockerfile (default ./Dockerfile)
sets dockerfile to use for the image build
context (default ./)
sets the path of the build context to use
tags (default latest)
sets repository tags to use for the image; tags can also be loaded from a .tags file
auto_tag
generates tag names automatically based on git branch and git tag
auto_tag_suffix
generates tag names with the given suffix
build_args
sets custom build arguments for the build
build_args_from_env
forwards environment variables as custom arguments to the build
quiet
enables suppression of the build output
target
sets the build target to use
cache_from
sets images to consider as cache sources
pull_image (default true)
enforces to pull base image at build time
compress
enables compression og the build context using gzip
repo
sets repository name for the image
registry (default https://index.docker.io/v1/)
sets docker registry to authenticate with
username
sets username to authenticates with
password
sets password to authenticates with
email
sets email addres to authenticates with
config
sets content of the docker daemon json config
purge (default true)
enables cleanup of the docker environment at the end of a build
no_cache
disables the usage of cached intermediate containers
add_host
sets additional host:ip mapping

Contributors

Special thanks goes to all contributors. If you would like to contribute, please see the instructions.

License

This project is licensed under the MIT License - see the LICENSE file for details.