Documentation ¶
Index ¶
- func ContainerImageNameFromImage(fullImage string) (string, error)
- func ContainerImageNameTagFromImage(fullImage string) (string, error)
- func ContainerRegistryFromImage(fullImage string) (string, error)
- func ContainerRegistryFromURL(registryURL string) (string, error)
- func CreateDockerConfigJSON(registryURL, username, password, targetPath, configPath string, ...) (string, error)
- func ImageListWithFilePath(imageName string, excludes []string, trimDir string, ...) (map[string]string, error)
- func IsBinfmtMiscSupportedByHost(utils piperutils.FileUtils) (bool, error)
- type AuthEntry
- type Client
- type ClientOptions
- type Download
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerImageNameFromImage ¶
ContainerImageNameFromImage returns the image name of a given docker reference
func ContainerImageNameTagFromImage ¶
ContainerImageNameTagFromImage provides the name & tag part of a full image name
func ContainerRegistryFromImage ¶
ContainerRegistryFromImage provides the registry part of a full image name
func ContainerRegistryFromURL ¶
ContainerRegistryFromURL provides the registry part of a complete registry url including the port
func CreateDockerConfigJSON ¶
func CreateDockerConfigJSON(registryURL, username, password, targetPath, configPath string, utils piperutils.FileUtils) (string, error)
CreateDockerConfigJSON creates / updates a Docker config.json with registry credentials
func ImageListWithFilePath ¶
func ImageListWithFilePath(imageName string, excludes []string, trimDir string, utils piperutils.FileUtils) (map[string]string, error)
ImageListWithFilePath compiles container image names based on all Dockerfiles found, considering excludes according to following search pattern: **/Dockerfile* Return value contains a map with image names and file path Examples for image names with imageName testImage * Dockerfile: `imageName` * sub1/Dockerfile: `imageName-sub1` * sub2/Dockerfile_proxy: `imageName-sub2-proxy`
func IsBinfmtMiscSupportedByHost ¶
func IsBinfmtMiscSupportedByHost(utils piperutils.FileUtils) (bool, error)
IsBinfmtMiscSupportedByHost checks if the hosts kernel does support binfmt_misc
Types ¶
type AuthEntry ¶
type AuthEntry struct {
Auth string `json:"auth,omitempty"`
}
AuthEntry defines base64 encoded username:password required inside a Docker config.json
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines an docker client object
func (*Client) DownloadImage ¶
DownloadImage downloads the image and saves it as tar at the given path
func (*Client) DownloadImageContent ¶
DownloadImageContent downloads the image content into the given targetDir. Returns with an error if the targetDir doesnt exist
func (*Client) GetRemoteImageInfo ¶
GetRemoteImageInfo retrieves information about the image (e.g. digest) without actually downoading it
func (*Client) SetOptions ¶
func (c *Client) SetOptions(options ClientOptions)
SetOptions sets options used for the docker client