modulepackage
1.2.0
Repository: https://github.com/joseluisq/drone-docker.git
Documentation: pkg.go.dev
# README
Drone Docker Plugin
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:
Additional Features
- Auto tag aliases support via
auto_tag_aliases
list that can be used along withauto_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
# Packages
No description provided by the author
# Functions
DeduplicateStringSlice makes string slice deduplication in-place (comparable) Adapted from https://github.com/golang/go/wiki/SliceTricks#in-place-deduplicate-comparable.
DefaultTags returns a set of default suggested tags based on the commit ref.
DefaultTagSuffix returns a set of default suggested tags based on the commit ref with an attached suffix.
UseDefaultTag for keep only default branch for latest tag.