Documentation ¶
Overview ¶
Package gogetdockerimage contains functions to download and save docker images.
Index ¶
- func DownloadImage(imageName string) error
- func GetCustomRegistry(image string) (string, error)
- func GetImagesFromDockerCompose(dockerfilePath string) ([]string, error)
- func GetImagesFromDockerfile(dockerfilePath string) ([]string, error)
- func GetOutputName(image string) (string, error)
- func RemoveDir(dir string) error
- func SaveImage(imageName, outDir, outName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadImage ¶
DownloadImage download docker image by name.
func GetCustomRegistry ¶ added in v0.6.0
GetCustomRegistry return the name of custom registry, if present
func GetImagesFromDockerCompose ¶
GetImagesFromDockerCompose returns all images found in given docker-compose file. It search for occurrences of "image: <imageName>" or "image: "<imageName>"" Search is performed case insensitive.
func GetImagesFromDockerfile ¶
GetImagesFromDockerfile returns all images found in given Dockerfile. It search for occurrences of "FROM imageName" or "FROM imageName AS alias" Search is performed case insensitive. Declaration of scratch is ignored.
func GetOutputName ¶
GetOutputName returns name of generated file from image name foo -> foo.docker.img foo/bar -> foo_bar.docker.img foo/bar:42 -> foo_bar_42.docker.img
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
getdockerimage
SPDX-FileCopyrightText: 2021 Eric Neidhardt SPDX-License-Identifier: MIT
|
SPDX-FileCopyrightText: 2021 Eric Neidhardt SPDX-License-Identifier: MIT |
internal
|
|
verify
Package verify provides utility functions for tests.
|
Package verify provides utility functions for tests. |