Documentation ¶
Index ¶
- func ConstructBuildCommand(opts types.ImageBuildOptions, buildpath string) string
- func ConstructImageInspectCommand(tag string) string
- func ConstructImagePushCommand(tag string) string
- func ConstructManifestCreateCommand(tag string, manifests ...string) string
- func ConstructManifestPushCommand(tag string) string
- func ConstructRegistryLoginCommand(registry, username, password string) string
- func GetBuildpathArchive(path string, dockerfile string) (io.ReadCloser, error)
- func GetImageDigest(ctx context.Context, image string, opts ...GetImageDigestOption) (string, error)
- func InjectTargetPlatformArgsToDockerfile(raw io.Reader, os, arch, variant string) io.Reader
- func ZipWithOptions(srcPath string, options *ZipOptions) (io.ReadCloser, error)
- type GetImageDigestOption
- type StructuredName
- type ZipOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructBuildCommand ¶
func ConstructBuildCommand(opts types.ImageBuildOptions, buildpath string) string
ConstructBuildCommand constructs the building command.
func ConstructImageInspectCommand ¶
ConstructImageInspectCommand constructs the inspecting image command.
func ConstructImagePushCommand ¶
ConstructImagePushCommand constructs the pushing image command.
func ConstructManifestCreateCommand ¶
ConstructManifestCreateCommand constructs the creating manifest command.
func ConstructManifestPushCommand ¶
ConstructManifestPushCommand constructs the pushing manifest command.
func ConstructRegistryLoginCommand ¶
ConstructRegistryLoginCommand constructs the login registry command.
func GetBuildpathArchive ¶
func GetBuildpathArchive(path string, dockerfile string) (io.ReadCloser, error)
GetBuildpathArchive retrieves the context to build.
func GetImageDigest ¶
func GetImageDigest(ctx context.Context, image string, opts ...GetImageDigestOption) (string, error)
GetImageDigest returns the image digest.
func InjectTargetPlatformArgsToDockerfile ¶ added in v0.2.3
func ZipWithOptions ¶
func ZipWithOptions(srcPath string, options *ZipOptions) (io.ReadCloser, error)
ZipWithOptions creates an archive from the directory at `path`, only including files whose relative paths are included in `options.IncludeFiles` (if non-nil) or not in `options.ExcludePatterns`.
Types ¶
type GetImageDigestOption ¶
type GetImageDigestOption func(rt http.RoundTripper) http.RoundTripper
func WithBasicAuth ¶
func WithBasicAuth(username, password string) GetImageDigestOption
func WithBearerToken ¶
func WithBearerToken(token string) GetImageDigestOption
func WithManifestSupport ¶
func WithManifestSupport() GetImageDigestOption
func WithManifestV1SupportOnly ¶
func WithManifestV1SupportOnly() GetImageDigestOption
type StructuredName ¶
StructuredName structures the image name.
func ParseImage ¶
func ParseImage(image string) StructuredName
ParseImage parses the image string to a structure, it can parse the following image string: - docker.io/library/ubuntu:21.04 -> {docker.io, library/ubuntu, 21.04} - docker.io/library/ubuntu -> {docker.io, library/ubuntu, latest} - library/ubuntu:20.10 -> {docker.io, library/ubuntu, 20.10} - ubuntu:latest -> {docker.io, library/ubuntu, latest} - ubuntu -> {docker.io, library/ubuntu, latest}
func (StructuredName) GetManifestRequest ¶
func (StructuredName) String ¶
func (i StructuredName) String() string