docker

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(ctx context.Context) error

Types

type CleanupArtifactsOption

type CleanupArtifactsOption func(*CleanupArtifactsOptions)

func WithSkipLatest

func WithSkipLatest(skipLatest bool) CleanupArtifactsOption

type CleanupArtifactsOptions

type CleanupArtifactsOptions struct {
	SkipLatest bool
}

type DockerClient

type DockerClient struct {
	CLI *client.Client

	// If true, intermediate images will be removed when cleaning up
	// images. This keeps the environment clean, but increases build
	// times when Flowpipe is first launched. Default is true.
	PruneImages bool
	// contains filtered or unexported fields
}

Client represents a connection to Docker.

var GlobalDockerClient *DockerClient

func New

func New(options ...Option) (*DockerClient, error)

New creates a new Docker client with the provided options.

func (*DockerClient) CleanupArtifacts

func (dc *DockerClient) CleanupArtifacts() error

CleanupArtifacts deletes all containers and images related to flowpipe.

func (*DockerClient) CleanupArtifactsForLabel

func (dc *DockerClient) CleanupArtifactsForLabel(key string, value string, opts ...CleanupArtifactsOption) error

CleanupArtifacts deletes all containers and images related to flowpipe.

func (*DockerClient) ImageExists

func (dc *DockerClient) ImageExists(imageName string) (bool, error)

func (*DockerClient) ImagePull

func (dc *DockerClient) ImagePull(imageName string) error

type Option

type Option func(*DockerClient) error

Option defines a function signature for configuring the Docker client.

func WithContext

func WithContext(ctx context.Context) Option

WithContext configures the Docker client with a specific context.

func WithPingTest

func WithPingTest() Option

WithPingTest configures the Docker client to perform a ping test to ensure the Docker service is running and available.

func WithPruneImages

func WithPruneImages() Option

Jump to

Keyboard shortcuts

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