{"id":44332676,"url":"https://github.com/drone-plugins/drone-img","last_synced_at":"2026-02-11T10:30:45.500Z","repository":{"id":59044161,"uuid":"528074268","full_name":"drone-plugins/drone-img","owner":"drone-plugins","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-18T02:12:50.000Z","size":538,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T14:32:29.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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":null,"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-08-23T16:27:43.000Z","updated_at":"2022-08-23T16:28:59.000Z","dependencies_parsed_at":"2023-12-26T23:25:36.810Z","dependency_job_id":"711cf0c2-0159-4f5d-b668-0de36c145876","html_url":"https://github.com/drone-plugins/drone-img","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drone-plugins/drone-img","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-img","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-img/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-img/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-img/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drone-plugins","download_url":"https://codeload.github.com/drone-plugins/drone-img/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone-plugins%2Fdrone-img/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29332277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: 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":[],"created_at":"2026-02-11T10:30:42.415Z","updated_at":"2026-02-11T10:30:45.494Z","avatar_url":"https://github.com/drone-plugins.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drone-img\n\n[![Build Status](http://cloud.drone.io/api/badges/drone-plugins/drone-img/status.svg)](http://cloud.drone.io/drone-plugins/drone-img)\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-img?status.svg)](http://godoc.org/github.com/drone-plugins/drone-img)\n[![Go Report](https://goreportcard.com/badge/github.com/drone-plugins/drone-img)](https://goreportcard.com/report/github.com/drone-plugins/drone-img)\n\nDrone plugin uses img to build and publish Docker images to a container registry. It allows running docker builds on kubernetes environment in rootless and non-privileged mode. It is required to set the annotation on the kubernetes pod container.apparmor.security.beta.kubernetes.io/\u003ccontainer-name\u003e: unconfined\n\nFor the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-img/).\n\n## Build\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/img-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/img-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/img-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/img-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/img-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/img-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  plugins/img-docker --dry-run\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-img -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-img -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-img","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrone-plugins%2Fdrone-img","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrone-plugins%2Fdrone-img/lists"}