public class DockerImage extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NAMESPACE |
static String |
DEFAULT_TAG |
static String |
SECTION_SEPARATOR |
static String |
TAG_SEPARATOR |
Constructor and Description |
---|
DockerImage() |
Modifier and Type | Method and Description |
---|---|
static DockerImage |
fromImageName(String imageName)
parse a full image name (myhost:300/namespace/repo:tag) into its components
|
static DockerImage |
fromParts(String hostPart,
String namespacePart,
String repoAndTagPart) |
static DockerImage |
fromParts(String hostPart,
String namespacePart,
String repo,
String tag) |
String |
getHost() |
String |
getNamespace() |
String |
getNamespaceAndRepo() |
String |
getRepository() |
String |
getTag() |
boolean |
isDockerHubImage() |
static boolean |
isValidNamespace(String namespaceCandidate)
When a image name part can be ambiguously either host or namespace, check which one it
is based on a regex of valid characters for the namespace part
|
String |
toString()
Convert to a canonical string representation.
|
public static final String SECTION_SEPARATOR
public static final String TAG_SEPARATOR
public static final String DEFAULT_NAMESPACE
public static final String DEFAULT_TAG
public static DockerImage fromImageName(String imageName)
imageName
- the image namepublic static DockerImage fromParts(String hostPart, String namespacePart, String repoAndTagPart)
public static DockerImage fromParts(String hostPart, String namespacePart, String repo, String tag)
public static boolean isValidNamespace(String namespaceCandidate)
namespaceCandidate
- candidate string for host or namespacepublic String getHost()
public String getNamespace()
public String getRepository()
public String getNamespaceAndRepo()
public String getTag()
public boolean isDockerHubImage()
public String toString()
Copyright © 2023 Pivotal Software, Inc.. All rights reserved.