docker

package
v0.23.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package docker provides the ability for Vela to integrate with Docker as a runtime environment.

Usage:

import "github.com/go-vela/worker/runtime/docker"

Index

Constants

View Source
const Version = "v1.40"

Version represents the supported Docker API version for the mock.

The Docker API version is pinned to ensure compatibility between the Docker API and client. The goal is to maintain n-1 compatibility.

The maximum supported Docker API version for the client is here:

https://docs.docker.com/engine/api/#api-version-matrix

For example (use the compatibility matrix above for reference):

* the Docker version of v20.10 has a maximum API version of v1.41 * to maintain n-1, the API version is pinned to v1.40 .

Variables

This section is empty.

Functions

func New

func New(opts ...ClientOpt) (*client, error)

New returns an Engine implementation that integrates with a Docker runtime.

func NewMock

func NewMock(opts ...ClientOpt) (*client, error)

NewMock returns an Engine implementation that integrates with a mock Docker runtime.

This function is intended for running tests only.

Types

type ClientOpt added in v0.11.0

type ClientOpt func(*client) error

ClientOpt represents a configuration option to initialize the runtime client for Docker.

func WithDropCapabilities added in v0.19.0

func WithDropCapabilities(caps []string) ClientOpt

WithDropCapabilities sets the kernel capabilities to drop from each container in the runtime client for Docker.

func WithHostVolumes added in v0.11.0

func WithHostVolumes(volumes []string) ClientOpt

WithHostVolumes sets the host volumes in the runtime client for Docker.

func WithLogger added in v0.12.0

func WithLogger(logger *logrus.Entry) ClientOpt

WithLogger sets the logger in the runtime client for Docker.

func WithPrivilegedImages added in v0.11.0

func WithPrivilegedImages(images []string) ClientOpt

WithPrivilegedImages sets the privileged images in the runtime client for Docker.

Jump to

Keyboard shortcuts

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