2021-01-10 22:47:55 +00:00
# drone-docker-buildx
2015-05-15 05:12:50 +00:00
2021-01-10 22:47:55 +00:00
Drone plugin to build multiarch Docker images with buildx
2019-01-20 23:19:15 +00:00
2021-01-10 22:47:55 +00:00
[![Build Status ](https://img.shields.io/drone/build/thegeeklab/drone-docker-buildx?logo=drone )](https://cloud.drone.io/thegeeklab/drone-docker-buildx)
[![Docker Hub ](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white )](https://hub.docker.com/r/thegeeklab/drone-docker-buildx)
[![Quay.io ](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white )](https://quay.io/repository/thegeeklab/drone-docker-buildx)
[![Go Report Card ](https://goreportcard.com/badge/github.com/thegeeklab/drone-docker-buildx )](https://goreportcard.com/report/github.com/thegeeklab/drone-docker-buildx)
[![GitHub contributors ](https://img.shields.io/github/contributors/thegeeklab/drone-docker-buildx )](https://github.com/thegeeklab/drone-docker-buildx/graphs/contributors)
[![Source: GitHub ](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white )](https://github.com/thegeeklab/drone-docker-buildx)
[![License: MIT ](https://img.shields.io/github/license/thegeeklab/drone-docker-buildx )](https://github.com/thegeeklab/drone-docker-buildx/blob/main/LICENSE)
Drone plugin to build multiarch Docker images with buildx.
2016-01-17 23:20:19 +00:00
2016-05-03 23:17:16 +00:00
## Build
2021-01-10 22:47:55 +00:00
Build the binary with the following command:
2016-05-03 23:17:16 +00:00
2021-01-10 22:47:55 +00:00
```Shell
2019-01-22 10:27:13 +00:00
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on
2021-01-10 22:47:55 +00:00
go build -v -a -tags netgo -o release/drone-docker-buildx
2016-05-03 23:17:16 +00:00
```
2015-05-15 05:12:50 +00:00
2021-01-10 22:47:55 +00:00
Build the Docker image with the following command:
2015-05-15 05:12:50 +00:00
2021-01-10 22:47:55 +00:00
```Shell
docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-docker-buildx .
2016-05-03 23:17:16 +00:00
```
## Usage
2021-01-10 22:47:55 +00:00
> Notice: Be aware that the tis plugin requires privileged capabilities, otherwise the integrated Docker daemon is not able to start.
2016-05-03 23:17:16 +00:00
2019-02-15 10:58:33 +00:00
```console
2016-05-03 23:17:16 +00:00
docker run --rm \
-e PLUGIN_TAG=latest \
-e PLUGIN_REPO=octocat/hello-world \
2021-01-10 22:47:55 +00:00
-e DRONE_COMMIT_SHA=00000000 \
2016-05-04 19:51:06 +00:00
-v $(pwd):$(pwd) \
2016-05-03 23:34:08 +00:00
-w $(pwd) \
--privileged \
2021-01-10 22:47:55 +00:00
thegeeklab/drone-docker-buildx --dry-run
2015-05-15 05:12:50 +00:00
```
2021-01-10 22:47:55 +00:00
## Contributors
Special thanks goes to all [contributors ](https://github.com/thegeeklab/drone-docker-buildx/graphs/contributors ). If you would like to contribute,
please see the [instructions ](https://github.com/thegeeklab/drone-docker-buildx/blob/main/CONTRIBUTING.md ).
## License
This project is licensed under the MIT License - see the [LICENSE ](https://github.com/thegeeklab/drone-docker-buildx/blob/main/LICENSE ) file for details.