Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultPlatform string = "linux/amd64"
Variables ¶
This section is empty.
Functions ¶
func SplitDockerImage ¶
SplitDockerImage splits the image into the name and tag. If the image does not have a tag or is invalid, the full string is returned as name, and tag will be empty.
Types ¶
type ContainerImage ¶
type ContainerImage struct { // The registry name Registry string `json:"registry,omitempty"` // The repository name or path Repository string `json:"repository,omitempty"` // The tag Tag string `json:"tag,omitempty"` }
ContainerImage represents a container image and its components
func ParseContainerImage ¶
func ParseContainerImage(image string) (*ContainerImage, error)
func (*ContainerImage) Local ¶
func (ci *ContainerImage) Local() string
Local returns the local image name without registry
func (*ContainerImage) Remote ¶
func (ci *ContainerImage) Remote() string
Remote returns the remote image name with registry when specified
type Docker ¶
type Docker interface { tools.ExternalTool Login(ctx context.Context, loginServer string, username string, password string) error Build( ctx context.Context, cwd string, dockerFilePath string, platform string, target string, buildContext string, name string, buildArgs []string, buildProgress io.Writer, ) (string, error) Tag(ctx context.Context, cwd string, imageName string, tag string) error Push(ctx context.Context, cwd string, tag string) error Pull(ctx context.Context, imageName string) error Inspect(ctx context.Context, imageName string, format string) (string, error) }
func NewDocker ¶
func NewDocker(commandRunner exec.CommandRunner) Docker
Click to show internal directories.
Click to hide internal directories.