Documentation
¶
Index ¶
- func BuildAndPushImage(cli DockerClient, ctx context.Context, ...) error
- func CreateDockerfileTemplate(baseImage string, additional []string) error
- func EncodeAuthConfig(authConfig types.AuthConfig) (string, error)
- func GetDockerCredentials(registryURL string) (string, string, error)
- type AuthConfig
- type DockerClient
- type DockerConfig
- type DockerfileData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAndPushImage ¶
func BuildAndPushImage(cli DockerClient, ctx context.Context, imageName, imageTag, registryURL, username, password string, bar *progressbar.ProgressBar) error
BuildAndPushImage builds and pushes a Docker image to the specified registry
func CreateDockerfileTemplate ¶
CreateDockerfileTemplate generates a Dockerfile using Go templating
func EncodeAuthConfig ¶
func EncodeAuthConfig(authConfig types.AuthConfig) (string, error)
EncodeAuthConfig encodes Docker authentication configuration as a base64 JSON string.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
Auth string `json:"auth"` // This is the base64 encoded username:password
}
AuthConfig holds the authentication data for a Docker registry
type DockerClient ¶
type DockerClient interface {
ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
ImagePush(ctx context.Context, image string, options types.ImagePushOptions) (io.ReadCloser, error)
}
DockerClient is an interface representing methods used from the Docker SDK client.
type DockerConfig ¶
type DockerConfig struct {
Auths map[string]AuthConfig `json:"auths"`
}
DockerConfig holds the configuration for Docker authentication
type DockerfileData ¶
DockerfileData holds the fields for the Dockerfile template
Click to show internal directories.
Click to hide internal directories.