Package com.yahoo.config.provision
Class DockerImage
- java.lang.Object
-
- com.yahoo.config.provision.DockerImage
-
public class DockerImage extends Object
A container image.- Author:
- mpolden
-
-
Field Summary
Fields Modifier and Type Field Description static DockerImage
EMPTY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asString()
boolean
equals(Object o)
static DockerImage
from(String registry, String repository)
static DockerImage
fromString(String s)
int
hashCode()
String
registry()
Returns the registry-part of this, i.e.String
repository()
Returns the repository-part of thisOptional<String>
tag()
Returns this image's tag, if anycom.yahoo.component.Version
tagAsVersion()
Returns the tag as aVersion
,Version.emptyVersion
if tag is not setString
toString()
String
untagged()
Returns the registry and repository for this image, excluding its tagDockerImage
withRegistry(String registry)
Returns a copy of this with registry set to given valueDockerImage
withTag(com.yahoo.component.Version version)
Returns a copy of this tagged with the given version
-
-
-
Field Detail
-
EMPTY
public static final DockerImage EMPTY
-
-
Method Detail
-
registry
public String registry()
Returns the registry-part of this, i.e. the host/port of the registry.
-
repository
public String repository()
Returns the repository-part of this
-
untagged
public String untagged()
Returns the registry and repository for this image, excluding its tag
-
tagAsVersion
public com.yahoo.component.Version tagAsVersion()
Returns the tag as aVersion
,Version.emptyVersion
if tag is not set
-
withTag
public DockerImage withTag(com.yahoo.component.Version version)
Returns a copy of this tagged with the given version
-
withRegistry
public DockerImage withRegistry(String registry)
Returns a copy of this with registry set to given value
-
asString
public String asString()
-
from
public static DockerImage from(String registry, String repository)
-
fromString
public static DockerImage fromString(String s)
-
-