Package io.fabric8.maven.docker.util
Class ContainerNamingUtil
- java.lang.Object
-
- io.fabric8.maven.docker.util.ContainerNamingUtil
-
public class ContainerNamingUtil extends Object
- Since:
- 1.0.0
- Author:
- marcus
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_CONTAINER_NAME_PATTERN
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringformatContainerName(ImageConfiguration image, String defaultContainerNamePattern, Date buildTimestamp, Collection<Container> existingContainers)static Collection<Container>getContainersToStop(ImageConfiguration image, String defaultContainerNamePattern, Date buildTimestamp, Collection<Container> containers)Keep only the entry with the higest index if an indexed naming scheme for container has been chosen.
-
-
-
Field Detail
-
DEFAULT_CONTAINER_NAME_PATTERN
public static final String DEFAULT_CONTAINER_NAME_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
formatContainerName
public static String formatContainerName(ImageConfiguration image, String defaultContainerNamePattern, Date buildTimestamp, Collection<Container> existingContainers)
-
getContainersToStop
public static Collection<Container> getContainersToStop(ImageConfiguration image, String defaultContainerNamePattern, Date buildTimestamp, Collection<Container> containers)
Keep only the entry with the higest index if an indexed naming scheme for container has been chosen.- Parameters:
image- the image from which to the the container patternbuildTimestamp- the timestamp for the buildcontainers- the list of existing containers- Returns:
- a list with potentially lower indexed entries removed
-
-