docker

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OCILabelTitle       = "org.opencontainers.image.title"
	OCILabelURL         = "org.opencontainers.image.url"
	OCILabelVersion     = "org.opencontainers.image.version"
	OCILabelDescription = "org.opencontainers.image.description"
	OCILabelCreated     = "org.opencontainers.image.created"
	OCILabelSource      = "org.opencontainers.image.source"
	OCILabelLicenses    = "org.opencontainers.image.licenses"
	OCILabelAuthors     = "org.opencontainers.image.authors"
	OCILabelVendor      = "org.opencontainers.image.vendor"
	OCILabelRevision    = "org.opencontainers.image.revision"
)
View Source
const (
	DefaultPlatform   = "linux/amd64"
	DefaultDockerfile = "Dockerfile"
	DefaultBuildCtx   = "."
	DefaultExtraCtx   = "./target/bin/linux/amd64/"
)

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, platform, dockerfile, buildCtx string, tags []string, extraCtx, labels map[string]string) error

Build is a short hand for docker buildx build with sane default flags.

func BuildDefault

func BuildDefault(ctx context.Context, imageName, url string) error

BuildDefault builds image with sane defaults.

func BuildDefaultWithDockerfile added in v1.5.7

func BuildDefaultWithDockerfile(ctx context.Context, imageName, url string, dockerfile string) error

BuildDefaultWithDockerfile builds image from custom Dockerfile location

func DefaultLabels

func DefaultLabels(imageName, url, desc string) map[string]string

DefaultLabels provides labels for Elisa SoSe/SRE organization.

func Docker

func Docker(ctx context.Context, args ...string) error

Docker executes systems docker cmd with given args.

func PushAllTags

func PushAllTags(ctx context.Context, imageName string) error

PushAllTags pushes all tags for given image.

func Run

func Run(ctx context.Context, args ...string) error

Run executes docker run cmd with given args.

func Tags

func Tags(imageName string, tags ...string) []string

Tags creates slice of tags using `tags` variable and DOCKER_IMAGE_TAGS env variable.

Types

This section is empty.

Directories

Path Synopsis
Package target exposes docker targets that can be imported in magefile using [import syntax].
Package target exposes docker targets that can be imported in magefile using [import syntax].

Jump to

Keyboard shortcuts

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