docker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Instance = &Docker{}

Functions

func Build

func Build(ctx context.Context) error

Run a buildx docker build

func Lint

func Lint(ctx context.Context) error

Use Hadolint to run a lint against all dockerfiles in this repository

func Push added in v0.0.31

func Push(ctx context.Context) error

Push all images. Assumes they were already built with Build --load

func RecordImage added in v0.0.9

func RecordImage(ctx context.Context) error

Record the image to a file (defined by DOCKER_IMAGE_FILE) or to stdout

func RotateCache

func RotateCache(ctx context.Context) error

Rotate the buildx caches for github

Types

type BuildConfig added in v0.0.14

type BuildConfig struct {
	BuildArgs []string
}

type Docker

type Docker struct {
	Env             env.Env
	Registry        registry.Registry
	CacheRegistry   registry.Registry
	CiCd            cicd.CiCd
	Git             *git.Git
	IgnoreFastBuild bool
}

func (*Docker) Build

func (d *Docker) Build(ctx context.Context) error

Build a docker image using buildx

func (*Docker) BuildWithConfig added in v0.0.14

func (d *Docker) BuildWithConfig(ctx context.Context, config BuildConfig) error

BuildWithConfig will build a docker image using buildx and build configuration

func (*Docker) BuildxCacheFrom

func (d *Docker) BuildxCacheFrom() string

func (*Docker) BuildxCacheTo

func (d *Docker) BuildxCacheTo() string

func (*Docker) CacheRepository added in v0.0.19

func (d *Docker) CacheRepository() string

func (*Docker) Image

func (d *Docker) Image() string

func (*Docker) ImageExists added in v0.0.17

func (d *Docker) ImageExists(ctx context.Context, tag string) bool

func (*Docker) ImageWithTag added in v0.0.12

func (d *Docker) ImageWithTag(tag string) string

func (*Docker) ImageWithTagForRegistry added in v0.0.19

func (d *Docker) ImageWithTagForRegistry(regist registry.Registry, repository string, tag string) string

func (*Docker) Lint

func (d *Docker) Lint(ctx context.Context) error

func (*Docker) Push added in v0.0.31

func (d *Docker) Push(ctx context.Context) error

Push assumes the images were already built and does the docker push to the remote repository

func (*Docker) RecordImage added in v0.0.9

func (d *Docker) RecordImage() error

func (*Docker) Repository

func (d *Docker) Repository() string

func (*Docker) RotateCache

func (d *Docker) RotateCache(ctx context.Context) error

func (*Docker) SanitizeTag

func (d *Docker) SanitizeTag(s string) string

func (*Docker) Tag

func (d *Docker) Tag() string

Directories

Path Synopsis
ecr

Jump to

Keyboard shortcuts

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