{"id":42649973,"url":"https://github.com/drone-plugins/drone-buildx","last_synced_at":"2026-04-02T23:10:25.982Z","repository":{"id":139970010,"uuid":"497435333","full_name":"drone-plugins/drone-buildx","owner":"drone-plugins","description":"Drone plugin for publishing Docker images using Docker-in-Docker using buildx","archived":false,"fork":false,"pushed_at":"2026-02-23T11:41:28.000Z","size":737,"stargazers_count":8,"open_issues_count":8,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-23T20:04:20.327Z","etag":null,"topics":["drone","drone-plugin"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drone-plugins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-28T21:55:49.000Z","updated_at":"2026-02-23T11:37:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6f9d02f-e036-4a35-b2b2-771fe32d0505","html_url":"https://github.com/drone-plugins/drone-buildx","commit_stats":null,"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"purl":"pkg:github/drone-plugins/drone-buildx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-buildx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-buildx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-buildx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-buildx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drone-plugins","download_url":"https://codeload.github.com/drone-plugins/drone-buildx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-buildx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drone","drone-plugin"],"created_at":"2026-01-29T07:21:46.133Z","updated_at":"2026-03-04T08:07:19.884Z","avatar_url":"https://github.com/drone-plugins.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drone-docker\n\n[![Build Status](http://cloud.drone.io/api/badges/drone-plugins/drone-docker/status.svg)](http://cloud.drone.io/drone-plugins/drone-docker)\n[![Gitter chat](https://badges.gitter.im/drone/drone.png)](https://gitter.im/drone/drone)\n[![Join the discussion at https://discourse.drone.io](https://img.shields.io/badge/discourse-forum-orange.svg)](https://discourse.drone.io)\n[![Drone questions at https://stackoverflow.com](https://img.shields.io/badge/drone-stackoverflow-orange.svg)](https://stackoverflow.com/questions/tagged/drone.io)\n[![](https://images.microbadger.com/badges/image/plugins/docker.svg)](https://microbadger.com/images/plugins/docker \"Get your own image badge on microbadger.com\")\n[![Go Doc](https://godoc.org/github.com/drone-plugins/drone-docker?status.svg)](http://godoc.org/github.com/drone-plugins/drone-docker)\n[![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-docker)](https://goreportcard.com/report/github.com/drone-plugins/drone-docker)\n\nDrone plugin uses Docker-in-Docker to build and publish Docker images to a container registry. For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-docker/).\n\n## Updating Buildkit Version\n\nIf you want to update the buildkit version that is bundled with the plugin then update the version in the buildkit/version.json file and also run the following pipeline to upload the assets in the correct place: https://harness0.harness.io/ng/account/l7B_kbSEQD2wjrM7PShm5w/all/orgs/PROD/projects/CI/pipelines/Buildkit_Tarball_Uploader/pipeline-studio?storeType=INLINE\n\n## Build\n\nbuildkit/version.json is the source of truth for the buildkit version to be used for self hosted. Please update this to use a newer buildkit version\n\nRun the release script for buildkit. Give the argument according to the infra you are compiling for\n\n```console\nsh buildkit/release.sh linux/amd64\n```\n\nBuild the binaries with the following commands:\n\n```console\nexport GOOS=linux\nexport GOARCH=amd64\nexport CGO_ENABLED=0\nexport GO111MODULE=on\n\ngo build -v -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker\ngo build -v -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr\ngo build -v -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr\ngo build -v -a -tags netgo -o release/linux/amd64/drone-acr ./cmd/drone-acr\ngo build -v -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku\n```\n\n## Docker\n\nBuild the Docker images with the following commands:\n\n```console\ndocker build \\\n  --label org.label-schema.build-date=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") \\\n  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \\\n  --file docker/docker/Dockerfile.linux.amd64 --tag plugins/docker .\n\ndocker build \\\n  --label org.label-schema.build-date=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") \\\n  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \\\n  --file docker/gcr/Dockerfile.linux.amd64 --tag plugins/gcr .\n\ndocker build \\\n  --label org.label-schema.build-date=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") \\\n  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \\\n  --file docker/ecr/Dockerfile.linux.amd64 --tag plugins/ecr .\n\ndocker build \\\n  --label org.label-schema.build-date=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") \\\n  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \\\n  --file docker/acr/Dockerfile.linux.amd64 --tag plugins/acr .\n\ndocker build \\\n  --label org.label-schema.build-date=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\") \\\n  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \\\n  --file docker/heroku/Dockerfile.linux.amd64 --tag plugins/heroku .\n```\n\n## Usage\n\n\u003e Notice: Be aware that the Docker plugin currently requires privileged capabilities, otherwise the integrated Docker daemon is not able to start.\n\n### Using Docker buildkit Secrets\n\n```yaml\nkind: pipeline\nname: default\n\nsteps:\n- name: build dummy docker file and publish\n  image: plugins/docker\n  pull: never\n  settings:\n    repo: tphoney/test\n    tags: latest\n    secret: id=mysecret,src=secret-file\n    username:\n      from_secret: docker_username\n    password:\n      from_secret: docker_password\n```\n\nUsing a dockerfile that references the secret-file \n\n```bash\n# syntax=docker/dockerfile:1.2\n\nFROM alpine\n\n# shows secret from default secret location:\nRUN --mount=type=secret,id=mysecret cat /run/secrets/mysecret\n```\n\nand a secret file called secret-file\n\n```\nCOOL BANANAS\n```\n\n\n### Running from the CLI\n\n```console\ndocker run --rm \\\n  -e PLUGIN_TAG=latest \\\n  -e PLUGIN_REPO=octocat/hello-world \\\n  -e DRONE_COMMIT_SHA=d8dbe4d94f15fe89232e0402c6e8a0ddf21af3ab \\\n  -v $(pwd):$(pwd) \\\n  -w $(pwd) \\\n  --privileged \\\n  plugins/docker --dry-run\n```\n\n### Flag Usage\n\nUse PLUGIN_BUILDX_OPTIONS\n\nYou can pass all buildx supported flags together using the PLUGIN_BUILDX_OPTIONS environment variable:\n\n```console\nenvVariables:\n  PLUGIN_BUILDX_OPTIONS: \"--provenance=false, --platform=linux/amd64\"\n```\n\n#### For options with comma values\n\nIf you need to pass options that contain commas in their values (like `--output=type=tar,dest=image.tar`), use the PLUGIN_BUILDX_OPTIONS_SEMICOLON environment variable with semicolons (`;`) as separators:\n\n```console\nenvVariables:\n  PLUGIN_BUILDX_OPTIONS_SEMICOLON: \"--platform=linux/amd64,linux/arm64;--provenance=false;--output=type=tar,dest=image.tar\"\n```\n\n### Buildx Bake mode (opt-in)\n\nUse Docker Buildx Bake when you have a bake file (HCL/JSON/Compose) and want build orchestration across multiple targets and registries.\n\nInputs:\n- PLUGIN_BAKE_FILE: Path to your bake file. When set, the plugin runs `docker buildx bake` instead of classic `buildx build`.\n- PLUGIN_BAKE_OPTIONS: Semicolon-delimited extra bake CLI args and/or target names. Example: `--progress=plain;web;api` or `--set=*.platform=linux/amd64`.\n\nBehavior:\n- Do not include `--push` or `--load` in PLUGIN_BAKE_OPTIONS. The plugin adds these implicitly:\n  - `--push` when PLUGIN_DRY_RUN=false (default).\n  - `--load` when PLUGIN_DRY_RUN=true.\n- The existing `builder-name` is passed as `--builder` to bake if set.\n- The plugin does not auto-switch the builder driver in Bake mode. If your bake file uses `cache-to` (registry exports), set `PLUGIN_BUILDER_DRIVER=docker-container` explicitly.\n- If PLUGIN_METADATA_FILE is set, it is forwarded to bake as `--metadata-file`.\n- Bake mode ignores classic cache envs (PLUGIN_CACHE_FROM / PLUGIN_CACHE_TO / PLUGIN_NO_CACHE). Define cache in the bake file instead.\n- Bake mode and Push-only mode (PLUGIN_PUSH_ONLY) are mutually exclusive.\n- Classic tar export (PLUGIN_TAR_PATH) is not applied in Bake; define outputs in the bake file.\n\nExamples:\n\nBasic Bake with multi-registry push\n```yaml\nenvVariables:\n  PLUGIN_BAKE_FILE: docker-bake.hcl\n  # Either pass a config file path or JSON content for multi-registry auth\n  PLUGIN_CONFIG: /path/to/docker-config.json\n  # PLUGIN_CONFIG: '{\"auths\":{\"docker.io\":{\"auth\":\"...\"},\"ghcr.io\":{\"auth\":\"...\"}}}'\n```\n\nBake with specific targets and progress\n```yaml\nenvVariables:\n  PLUGIN_BAKE_FILE: docker-bake.hcl\n  PLUGIN_BAKE_OPTIONS: \"--progress=plain;web;api\"\n```\n\nBake with platform override\n```yaml\nenvVariables:\n  PLUGIN_BAKE_FILE: docker-bake.hcl\n  PLUGIN_BAKE_OPTIONS: \"--set=*.platform=linux/amd64\"\n```\n\n## Developer Notes\n\n- When updating the base image, you will need to update for each architecture and OS.\n- Arm32 base images are no longer being updated.\n\n## Release procedure\n\nRun the changelog generator.\n\n```BASH\ndocker run -it --rm -v \"$(pwd)\":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-plugins -p drone-docker -t \u003csecret github token\u003e\n```\n\nYou can generate a token by logging into your GitHub account and going to Settings -\u003e Personal access tokens.\n\nNext we tag the PR's with the fixes or enhancements labels. If the PR does not fufil the requirements, do not add a label.\n\nRun the changelog generator again with the future version according to semver.\n\n```BASH\ndocker run -it --rm -v \"$(pwd)\":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-plugins -p drone-docker -t \u003csecret token\u003e --future-release v1.0.0\n```\n\nCreate your pull request for the release. Get it merged then tag the release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrone-plugins%2Fdrone-buildx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrone-plugins%2Fdrone-buildx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrone-plugins%2Fdrone-buildx/lists"}