docs: prepare standalone plugin documentation (#27)

* docs: prepare standalone plugin documentation

* add markdownlint config
This commit is contained in:
Robert Kaussow 2021-09-11 12:40:31 +02:00 committed by GitHub
parent 3fd42b869c
commit 2ab3b97193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 412 additions and 337 deletions

12
.dictionary Normal file
View File

@ -0,0 +1,12 @@
url
ip
mtu
dns
ipv6
dockerfile
og
gzip
json
config
host:ip
multiarch

View File

@ -235,6 +235,61 @@ local PipelineBuildContainer(arch='amd64') = {
}, },
}; };
local PipelineDocs = {
kind: 'pipeline',
name: 'docs',
platform: {
os: 'linux',
arch: 'amd64',
},
concurrency: {
limit: 1,
},
steps: [
{
name: 'markdownlint',
image: 'thegeeklab/markdownlint-cli',
commands: [
"markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'",
],
},
{
name: 'spellcheck',
image: 'node:lts-alpine',
commands: [
'npm install -g spellchecker-cli',
"spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions",
],
environment: {
FORCE_COLOR: true,
NPM_CONFIG_LOGLEVEL: 'error',
},
},
{
name: 'publish',
image: 'plugins/gh-pages',
settings: {
username: { from_secret: 'github_username' },
password: { from_secret: 'github_token' },
pages_directory: '_docs/',
target_branch: 'docs',
},
when: {
ref: ['refs/heads/main'],
},
},
],
depends_on: [
'build-binaries',
'build-container-amd64',
'build-container-arm64',
'build-container-arm',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
local PipelineNotifications = { local PipelineNotifications = {
kind: 'pipeline', kind: 'pipeline',
image_pull_secrets: ['docker_config'], image_pull_secrets: ['docker_config'],
@ -320,10 +375,7 @@ local PipelineNotifications = {
}, },
], ],
depends_on: [ depends_on: [
'build-binaries', 'docs',
'build-container-amd64',
'build-container-arm64',
'build-container-arm',
], ],
trigger: { trigger: {
ref: ['refs/heads/main', 'refs/tags/**'], ref: ['refs/heads/main', 'refs/tags/**'],
@ -337,5 +389,6 @@ local PipelineNotifications = {
PipelineBuildContainer(arch='amd64'), PipelineBuildContainer(arch='amd64'),
PipelineBuildContainer(arch='arm64'), PipelineBuildContainer(arch='arm64'),
PipelineBuildContainer(arch='arm'), PipelineBuildContainer(arch='arm'),
PipelineDocs,
PipelineNotifications, PipelineNotifications,
] ]

View File

@ -1,106 +1,96 @@
--- ---
kind: pipeline
name: test
platform:
os: linux
arch: amd64
steps:
- name: staticcheck
image: golang:1.16
commands:
- go run honnef.co/go/tools/cmd/staticcheck ./...
volumes:
- name: gopath
path: /go
- name: lint
image: golang:1.16
commands:
- go run golang.org/x/lint/golint -set_exit_status ./...
volumes:
- name: gopath
path: /go
- name: vet
image: golang:1.16
commands:
- go vet ./...
volumes:
- name: gopath
path: /go
- name: test
image: golang:1.16
commands:
- go test -cover ./...
volumes:
- name: gopath
path: /go
volumes:
- name: gopath
temp: {}
image_pull_secrets: image_pull_secrets:
- docker_config - docker_config
kind: pipeline
name: test
platform:
arch: amd64
os: linux
steps:
- commands:
- go run honnef.co/go/tools/cmd/staticcheck ./...
image: golang:1.16
name: staticcheck
volumes:
- name: gopath
path: /go
- commands:
- go run golang.org/x/lint/golint -set_exit_status ./...
image: golang:1.16
name: lint
volumes:
- name: gopath
path: /go
- commands:
- go vet ./...
image: golang:1.16
name: vet
volumes:
- name: gopath
path: /go
- commands:
- go test -cover ./...
image: golang:1.16
name: test
volumes:
- name: gopath
path: /go
trigger: trigger:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
- refs/pull/** - refs/pull/**
volumes:
- name: gopath
temp: {}
--- ---
depends_on:
- test
image_pull_secrets:
- docker_config
kind: pipeline kind: pipeline
name: build-binaries name: build-binaries
platform: platform:
os: linux
arch: amd64 arch: amd64
os: linux
steps: steps:
- name: build - commands:
image: techknowlogick/xgo:go-1.16.x - '[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}'
commands:
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}"
- mkdir -p release/ - mkdir -p release/
- cd cmd/drone-docker && xgo -ldflags "-s -w -X main.version=$BUILD_VERSION" -tags netgo -targets 'linux/amd64,linux/arm-6,linux/arm-7,linux/arm64' -out drone-docker . - cd cmd/drone-docker && xgo -ldflags "-s -w -X main.version=$BUILD_VERSION" -tags
netgo -targets 'linux/amd64,linux/arm-6,linux/arm-7,linux/arm64' -out drone-docker
.
- mv /build/* /drone/src/release/ - mv /build/* /drone/src/release/
- ls -l /drone/src/release/ - ls -l /drone/src/release/
image: techknowlogick/xgo:go-1.16.x
- name: executable name: build
image: alpine - commands:
commands:
- $(find release/ -executable -type f | grep drone-docker-linux-amd64) --help - $(find release/ -executable -type f | grep drone-docker-linux-amd64) --help
- name: compress
image: alpine image: alpine
commands: name: executable
- commands:
- apk add upx - apk add upx
- find release/ -maxdepth 1 -executable -type f -exec upx {} \; - find release/ -maxdepth 1 -executable -type f -exec upx {} \;
- ls -lh release/ - ls -lh release/
- name: checksum
image: alpine image: alpine
commands: name: compress
- commands:
- cd release/ && sha256sum * > sha256sum.txt - cd release/ && sha256sum * > sha256sum.txt
image: alpine
- name: changelog-generate name: checksum
image: thegeeklab/git-chglog - commands:
commands:
- git fetch -tq - git fetch -tq
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased} - git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased
unreleased}
- name: changelog-format image: thegeeklab/git-chglog
image: thegeeklab/alpine-tools name: changelog-generate
commands: - commands:
- prettier CHANGELOG.md - prettier CHANGELOG.md
- prettier -w CHANGELOG.md - prettier -w CHANGELOG.md
image: thegeeklab/alpine-tools
- name: publish name: changelog-format
image: plugins/github-release - image: plugins/github-release
name: publish
settings: settings:
api_key: api_key:
from_secret: github_token from_secret: github_token
@ -112,36 +102,32 @@ steps:
when: when:
ref: ref:
- refs/tags/** - refs/tags/**
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
- refs/pull/** - refs/pull/**
---
depends_on: depends_on:
- test - test
image_pull_secrets:
--- - docker_config
kind: pipeline kind: pipeline
name: build-container-amd64 name: build-container-amd64
platform: platform:
os: linux
arch: amd64 arch: amd64
os: linux
steps: steps:
- name: build - commands:
- '[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}'
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/amd64/drone-docker
./cmd/drone-docker
image: golang:1.16 image: golang:1.16
commands: name: build
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}" - depends_on:
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/amd64/drone-docker ./cmd/drone-docker - build
- name: dryrun
image: plugins/docker:19 image: plugins/docker:19
name: dryrun
settings: settings:
config: config:
from_secret: docker_config from_secret: docker_config
@ -155,11 +141,10 @@ steps:
when: when:
ref: ref:
- refs/pull/** - refs/pull/**
depends_on: - depends_on:
- build - dryrun
- name: publish-dockerhub
image: plugins/docker:19 image: plugins/docker:19
name: publish-dockerhub
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: amd64 auto_tag_suffix: amd64
@ -175,11 +160,10 @@ steps:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on: - depends_on:
- dryrun - dryrun
- name: publish-quay
image: plugins/docker:19 image: plugins/docker:19
name: publish-quay
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: amd64 auto_tag_suffix: amd64
@ -196,38 +180,32 @@ steps:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on:
- dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
- refs/pull/** - refs/pull/**
---
depends_on: depends_on:
- test - test
image_pull_secrets:
--- - docker_config
kind: pipeline kind: pipeline
name: build-container-arm64 name: build-container-arm64
platform: platform:
os: linux
arch: arm64 arch: arm64
os: linux
steps: steps:
- name: build - commands:
- '[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}'
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm64/drone-docker
./cmd/drone-docker
image: golang:1.16 image: golang:1.16
commands: name: build
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}" - depends_on:
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm64/drone-docker ./cmd/drone-docker - build
- name: dryrun
image: plugins/docker:19 image: plugins/docker:19
name: dryrun
settings: settings:
config: config:
from_secret: docker_config from_secret: docker_config
@ -241,11 +219,10 @@ steps:
when: when:
ref: ref:
- refs/pull/** - refs/pull/**
depends_on: - depends_on:
- build - dryrun
- name: publish-dockerhub
image: plugins/docker:19 image: plugins/docker:19
name: publish-dockerhub
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm64 auto_tag_suffix: arm64
@ -261,11 +238,10 @@ steps:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on: - depends_on:
- dryrun - dryrun
- name: publish-quay
image: plugins/docker:19 image: plugins/docker:19
name: publish-quay
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm64 auto_tag_suffix: arm64
@ -282,38 +258,32 @@ steps:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on:
- dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
- refs/pull/** - refs/pull/**
---
depends_on: depends_on:
- test - test
image_pull_secrets:
--- - docker_config
kind: pipeline kind: pipeline
name: build-container-arm name: build-container-arm
platform: platform:
os: linux
arch: arm arch: arm
os: linux
steps: steps:
- name: build - commands:
- '[ -z "${DRONE_TAG}" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}'
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm/drone-docker
./cmd/drone-docker
image: golang:1.16 image: golang:1.16
commands: name: build
- "[ -z \"${DRONE_TAG}\" ] && BUILD_VERSION=${DRONE_COMMIT_SHA:0:8} || BUILD_VERSION=${DRONE_TAG##v}" - depends_on:
- go build -v -ldflags "-X main.version=$BUILD_VERSION" -a -tags netgo -o release/arm/drone-docker ./cmd/drone-docker - build
- name: dryrun
image: plugins/docker:19 image: plugins/docker:19
name: dryrun
settings: settings:
config: config:
from_secret: docker_config from_secret: docker_config
@ -327,11 +297,10 @@ steps:
when: when:
ref: ref:
- refs/pull/** - refs/pull/**
depends_on: - depends_on:
- build - dryrun
- name: publish-dockerhub
image: plugins/docker:19 image: plugins/docker:19
name: publish-dockerhub
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm auto_tag_suffix: arm
@ -347,11 +316,10 @@ steps:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on: - depends_on:
- dryrun - dryrun
- name: publish-quay
image: plugins/docker:19 image: plugins/docker:19
name: publish-quay
settings: settings:
auto_tag: true auto_tag: true
auto_tag_suffix: arm auto_tag_suffix: arm
@ -368,32 +336,68 @@ steps:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
depends_on:
- dryrun
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/main - refs/heads/main
- refs/tags/** - refs/tags/**
- refs/pull/** - refs/pull/**
depends_on:
- test
--- ---
concurrency:
limit: 1
depends_on:
- build-binaries
- build-container-amd64
- build-container-arm64
- build-container-arm
kind: pipeline
name: docs
platform:
arch: amd64
os: linux
steps:
- commands:
- markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'
image: thegeeklab/markdownlint-cli
name: markdownlint
- commands:
- npm install -g spellchecker-cli
- spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary
-p spell indefinite-article syntax-urls --no-suggestions
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
image: node:lts-alpine
name: spellcheck
- image: plugins/gh-pages
name: publish
settings:
pages_directory: _docs/
password:
from_secret: github_token
target_branch: docs
username:
from_secret: github_username
when:
ref:
- refs/heads/main
trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
---
depends_on:
- docs
image_pull_secrets:
- docker_config
kind: pipeline kind: pipeline
name: notifications name: notifications
platform: platform:
os: linux
arch: amd64 arch: amd64
os: linux
steps: steps:
- name: manifest-dockerhub - image: plugins/manifest
image: plugins/manifest name: manifest-dockerhub
settings: settings:
auto_tag: true auto_tag: true
ignore_missing: true ignore_missing: true
@ -405,9 +409,8 @@ steps:
when: when:
status: status:
- success - success
- image: plugins/manifest
- name: manifest-quay name: manifest-quay
image: plugins/manifest
settings: settings:
auto_tag: true auto_tag: true
ignore_missing: true ignore_missing: true
@ -419,10 +422,7 @@ steps:
when: when:
status: status:
- success - success
- environment:
- name: pushrm-dockerhub
image: chko/docker-pushrm:1
environment:
DOCKER_PASS: DOCKER_PASS:
from_secret: docker_password from_secret: docker_password
DOCKER_USER: DOCKER_USER:
@ -430,23 +430,23 @@ steps:
PUSHRM_FILE: README.md PUSHRM_FILE: README.md
PUSHRM_SHORT: Drone plugin to build multiarch Docker images PUSHRM_SHORT: Drone plugin to build multiarch Docker images
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME} PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
image: chko/docker-pushrm:1
name: pushrm-dockerhub
when: when:
status: status:
- success - success
- environment:
- name: pushrm-quay
image: chko/docker-pushrm:1
environment:
APIKEY__QUAY_IO: APIKEY__QUAY_IO:
from_secret: quay_token from_secret: quay_token
PUSHRM_FILE: README.md PUSHRM_FILE: README.md
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME} PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
image: chko/docker-pushrm:1
name: pushrm-quay
when: when:
status: status:
- success - success
- image: plugins/matrix
- name: matrix name: matrix
image: plugins/matrix
settings: settings:
homeserver: homeserver:
from_secret: matrix_homeserver from_secret: matrix_homeserver
@ -454,17 +454,15 @@ steps:
from_secret: matrix_password from_secret: matrix_password
roomid: roomid:
from_secret: matrix_roomid from_secret: matrix_roomid
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}" template: 'Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name
}}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message:
{{ build.message }}'
username: username:
from_secret: matrix_username from_secret: matrix_username
when: when:
status: status:
- success - success
- failure - failure
image_pull_secrets:
- docker_config
trigger: trigger:
ref: ref:
- refs/heads/main - refs/heads/main
@ -472,15 +470,8 @@ trigger:
status: status:
- success - success
- failure - failure
depends_on:
- build-binaries
- build-container-amd64
- build-container-arm64
- build-container-arm
--- ---
kind: signature kind: signature
hmac: aaee4bd5867ef52fc980b533cb9e34a242bace19bbf23a465731a7d360b7dac7 hmac: 890ccacd8805efc2b185d83ee4e171999cdaa1ce9a779955406baa626ef0b69a
... ...

6
.markdownlint.yml Normal file
View File

@ -0,0 +1,6 @@
---
default: True
MD013: False
MD041: False
MD004:
style: dash

143
README.md
View File

@ -10,153 +10,12 @@ Drone plugin to build multiarch Docker images
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/drone-docker) [![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/drone-docker)
[![License: MIT](https://img.shields.io/github/license/thegeeklab/drone-docker)](https://github.com/thegeeklab/drone-docker/blob/main/LICENSE) [![License: MIT](https://img.shields.io/github/license/thegeeklab/drone-docker)](https://github.com/thegeeklab/drone-docker/blob/main/LICENSE)
Drone plugin to build multiarch Docker images. This plugin is a fork of [drone-plugins/drone-docker](https://github.com/drone-plugins/drone-docker). Drone plugin to build multiarch Docker images. This plugin is a fork of [drone-plugins/drone-docker](https://github.com/drone-plugins/drone-docker). You can find the full documentation at You can find the full documentation at [https://drone-plugins.geekdocs.de](https://drone-plugins.geekdocs.de).
## Docker Tags ## 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`. 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:
```Shell
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:
```Shell
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.
```console
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 ## Contributors
Special thanks goes to all [contributors](https://github.com/thegeeklab/drone-docker/graphs/contributors). If you would like to contribute, Special thanks goes to all [contributors](https://github.com/thegeeklab/drone-docker/graphs/contributors). If you would like to contribute,

154
_docs/_index.md Normal file
View File

@ -0,0 +1,154 @@
---
title: drone-docker
---
<!-- prettier-ignore-start -->
<!-- spellchecker-disable -->
{{< toc >}}
<!-- spellchecker-enable -->
<!-- prettier-ignore-end -->
## Build
Build the binary with the following command:
```Shell
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:
```Shell
docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-docker .
```
## Usage
{{< hint [warning] >}}
**Note**\
Be aware that the this plugin requires privileged capabilities, otherwise the
integrated Docker daemon is not able to start.
{{< /hint >}}
```Shell
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 address 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