Skip to content

owncloud-ci/drone-docker-buildx

Repository files navigation

drone-docker-buildx

Build Status Docker Hub GitHub contributors Source: GitHub License: Apache-2.0

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

Usage

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

kind: pipeline
type: docker
name: default

steps:
  - name: docker
    image: owncloudci/drone-docker-buildx
    privileged: true
    settings:
      username: octocat
      password: secure
      repo: octocat/example
      tags: latest

Build

Build the binary with the following command:

make build

Build the Docker image with the following command:

docker build --file Dockerfile.multiarch --tag owncloudci/drone-docker-buildx .

Test

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

Releases

Create and push the new tag to trigger the CI release process:

git tag v2.10.3
git push origin v2.10.3

License

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

Copyright

Copyright (c) 2022 ownCloud GmbH