docker

package module
v0.0.0-...-d75e48b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

drone-docker

Drone DCT plugin uses Docker-in-Docker to sign Docker images to a container registry.

Build

Build the binaries with the following commands:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/drone-dct ./cmd/drone-dct
    
docker build  --file docker/docker/Dockerfile.linux.amd64 --tag zshaik/drone-dct:0.1.6 . --no-cache

Usage

steps:
  - name: docker_build
    image: zshaik/drone-dct:0.1.1
    pull: always
    settings:
      passphrase:
        from_secret: passphrase
      repokey:
        from_secret: repokey
      rootkey:
        from_secret: rootkey
      rootcertname: harbortrust
      rootkeyname:
        from_secret: rootkeyname
      repo: zshaik/busybox
      tag: signed-tag
      username:
        from_secret: docker_username
      password:
        from_secret: docker_password

Documentation

Index

Constants

View Source
const (
	RepositoryPassphrase = "DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

type Daemon struct {
	Registry      string   // Docker registry
	Mirror        string   // Docker registry mirror
	Insecure      bool     // Docker daemon enable insecure registries
	StorageDriver string   // Docker daemon storage driver
	StoragePath   string   // Docker daemon storage path
	Disabled      bool     // DOcker daemon is disabled (already running)
	Debug         bool     // Docker daemon started in debug mode
	Bip           string   // Docker daemon network bridge IP address
	DNS           []string // Docker daemon dns server
	DNSSearch     []string // Docker daemon dns search domain
	MTU           string   // Docker daemon mtu setting
	IPv6          bool     // Docker daemon IPv6 networking
	Experimental  bool     // Docker daemon enable experimental mode
}

Daemon defines Docker daemon parameters.

type Login

type Login struct {
	Registry string // Docker registry address
	Username string // Docker registry username
	Password string // Docker registry password
	Email    string // Docker registry email
	Config   string // Docker Auth Config
}

Login defines Docker login parameters.

type Plugin

type Plugin struct {
	Login  Login  // Docker login configuration
	Daemon Daemon // Docker daemon configuration
	Trust  Trust  // Docker trust configuration
}

Plugin defines the Docker plugin parameters.

func (Plugin) Exec

func (p Plugin) Exec() error

Exec executes the plugin step

type Trust

type Trust struct {
	Passphrase   string // Repository Passphrase for the key
	RepoKey      string // Repo Private key
	RootKeyName  string // Repo Private key
	RootKey      string // Root Private key
	RootCert     string // Root cert
	RootCertName string // Root cert name
	Repo         string // Repo to be signed
	Tag          string // Image Tag to be signed
}

Trust defines Docker trust parameters

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL