Documentation ¶
Index ¶
- Constants
- Variables
- func CompareDockerName(a, b string) bool
- func DetectRequirement() error
- func DockerBuild(name, tag, buildRoot string) error
- func DockerCheckTagExists(shortName, tag string, credential *DockerCredential) (bool, error)
- func DockerFindLatestTag(imageInfo *DockerImageInfo, credential *DockerCredential) (string, error)
- func DockerImageExistsOnLocal(fullname string) (bool, error)
- func DockerLogin(host, username, password string) error
- func DockerPull(fullname string) error
- func DockerPush(name, tag, buildRoot string, platforms []string) error
- func DockerRMI(name, tag string) error
- func DockerTryRMI(name, tag string) error
- func Error(err error)
- func Fatal(err error)
- func FormatDockerName(name string) string
- func FullVersion() string
- func Info(msg string, args ...interface{})
- func Info2(msg string, args ...interface{})
- func ResolveDir(rootDir, path string) string
- func RetryWithFixedDelay(delay time.Duration, retries int, f func() error) error
- func RunShellCommand(command string) error
- func Success(msg string, args ...interface{})
- func Warn(msg string, args ...interface{})
- type DockerCredential
- type DockerImageInfo
- type StringSet
Constants ¶
const ( DefaultRegistryName = "dockerhub" DefaultRegistry = "https://registry.hub.docker.com" )
Default values
Variables ¶
var ( // Version returns doriath version Version = "dev" // Commit returns doriath build commit Commit = "unknown" )
Functions ¶
func CompareDockerName ¶ added in v1.2.0
CompareDockerName compares 2 docker image names
func DetectRequirement ¶
func DetectRequirement() error
DetectRequirement detects requirement for doriath
func DockerBuild ¶
DockerBuild builds a docker image
func DockerCheckTagExists ¶
func DockerCheckTagExists(shortName, tag string, credential *DockerCredential) (bool, error)
DockerCheckTagExists checks if a tag exists on registry or not
func DockerFindLatestTag ¶ added in v1.4.0
func DockerFindLatestTag(imageInfo *DockerImageInfo, credential *DockerCredential) (string, error)
DockerFindLatestTag .
func DockerImageExistsOnLocal ¶ added in v1.4.8
DockerImageExistsOnLocal .
func DockerLogin ¶
DockerLogin logins to docker registry
func DockerPush ¶
DockerPush pushes a docker image
func DockerTryRMI ¶ added in v1.4.5
DockerTryRMI removes a docker image if exists, and will retry if necessary
func FormatDockerName ¶ added in v1.2.0
FormatDockerName adds library/ if possible
func FullVersion ¶ added in v1.6.0
func FullVersion() string
func ResolveDir ¶
ResolveDir appends a path to a rootDir
func RetryWithFixedDelay ¶ added in v1.4.5
RetryWithFixedDelay .
func RunShellCommand ¶ added in v1.3.0
RunShellCommand runs a command under bash shell
Types ¶
type DockerCredential ¶
type DockerCredential struct { Registry string Username string Password string HTTPToken string ChallengeType string }
DockerCredential holds credential information for a docker registry request
type DockerImageInfo ¶
DockerImageInfo stores common information for dockerfile
func ExtractDockerImageInfo ¶
func ExtractDockerImageInfo(fullnameWithTag string) (*DockerImageInfo, error)
ExtractDockerImageInfo extracts docker image info
func ExtractParentImageFromDockerfile ¶
func ExtractParentImageFromDockerfile(filename string) (*DockerImageInfo, error)
ExtractParentImageFromDockerfile extracs image information from dockerfile