Documentation
¶
Index ¶
- func Build(imageName, tag string, opts BuildOptions) error
- func PushImage(opts PushOptions) error
- func PushImageToACR(subscriptionID, resourceGroupName, registryName, imageName string) error
- func PushImageToECR(imageName, region, repositoryName string) error
- func PushImageToGCR(projectID, imageNameWithTag string) error
- func RemoveImage(imageTag string) error
- func TagImage(opts TagOptions) error
- func Trivy(dockerImage string) error
- type BuildOptions
- type ColorfulLogger
- type ECRLogger
- type ImageInfo
- type PushOptions
- type TagOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(imageName, tag string, opts BuildOptions) error
func PushImage ¶
func PushImage(opts PushOptions) error
PushImage pushes the specified Docker image to the Docker Hub. It authenticates with Docker Hub, tags the image, and pushes it to the registry. It displays a spinner with progress updates and prints the push response messages.
func PushImageToACR ¶
PushImageToACR pushes the specified Docker image to the specified Azure Container Registry. It authenticates with Azure, retrieves the registry details and credentials, tags the image, and pushes it to the registry. It displays a spinner with progress updates and prints the push response messages. Upon successful completion, it prints a success message with a link to the pushed image in the ACR.
func PushImageToECR ¶
func PushImageToGCR ¶
func RemoveImage ¶
RemoveImage removes the specified Docker image from the local Docker daemon. It displays a spinner with progress updates and prints the removal response messages. Upon successful completion, it prints a success message with the removed image tag.
func TagImage ¶
func TagImage(opts TagOptions) error
TagImage tags a Docker image with the specified source and target tags. It displays a spinner with progress updates and prints a success message upon completion.
Types ¶
type BuildOptions ¶
type BuildOptions struct {
ContextDir string
DockerfilePath string
BuildArgs map[string]string
Target string
Platform string
NoCache bool
BuildKit bool
Timeout time.Duration
Excludes []string
Labels map[string]string
}
BuildOptions contains configuration for the Docker build
type ColorfulLogger ¶ added in v0.0.6
type ColorfulLogger struct {
// contains filtered or unexported fields
}
func NewColorfulLogger ¶ added in v0.0.6
func NewColorfulLogger() *ColorfulLogger
type ECRLogger ¶ added in v0.0.6
type ECRLogger struct {
// contains filtered or unexported fields
}
func NewECRLogger ¶ added in v0.0.6
func NewECRLogger() *ECRLogger
type ImageInfo ¶ added in v0.0.4
type ImageInfo struct {
ID string
Size int64
Created time.Time
Platform string
Layers int
Tag string
}
ImageInfo struct to hold information about a Docker image
type PushOptions ¶
PushOptions struct to hold options for pushing a Docker image
type TagOptions ¶
TagOptions struct to hold options for tagging a Docker image