Skip to content

Drone plugin for publishing Docker Linux amd64 images using Docker-in-Docker

License

Notifications You must be signed in to change notification settings

joseluisq/drone-docker

 
 

Repository files navigation

Drone Docker Plugin

CI Docker Image Version (tag latest semver) Docker Image Size (tag) codecov Go Report Card GoDoc

Drone plugin fork which uses Docker-in-Docker to build and publish Docker Linux amd64 images only to a Container Registry.
This is just a fork for personal use with additional custom features. However you can always refer to official repository uptream.

This repository has made the following changes:

  • Stripped all non-Linux amd64 stuff
  • Latest Go v1.16
  • All dependencies up-to-date.

Additional Features

  • Auto tag aliases support via auto_tag_aliases list that can be used along with auto_tag.

For the original plugin features check out the drone-plugins docs.

Pipeline example

Note that a Drone pipeline should be configured with privileged: true.

- name: publish
  image: joseluisq/drone-docker
  pull: always
  # Privileged mode required
  privileged: true
  settings:
    repo: joseluisq/drone-docker
    dockerfile: Dockerfile
    username:
      from_secret: username
    password:
      from_secret: password
    auto_tag: true
    # Additional auto tag aliases
    auto_tag_aliases:
      - latest

Test

make test

Build

Build the binaries with the following commands:

make build

Docker

Build

Build the Docker image with the following commands:

make image-build

Run

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

make image-dryrun

About

Drone plugin for publishing Docker Linux amd64 images using Docker-in-Docker

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 82.3%
  • Jsonnet 13.5%
  • Makefile 4.2%