public abstract class BasicDockerMapper extends Object implements DockerMountMapper
| Constructor and Description |
|---|
BasicDockerMapper() |
| Modifier and Type | Method and Description |
|---|---|
String |
asInnerPath(String path)
Convert path to inner path form.
|
String |
asOuterPath(String innerPath)
Convert path to outer path form.
|
protected String |
formatConfigPath(String path)
Give a path as it appears in the config file, convert it to a form suitable for matching to map keys.
|
protected String |
formatHostPath(String path)
Given a path as it appears in the Docker inspect Mount host info, convert the path to a form suitable for the map as a key.
|
protected String |
formatInnerPath(String path)
Given a path as it appears in the target portion of a Mount entry, convert the path to a form suitable for the map a value.
|
protected String |
getDockerInfoCmd() |
TreeMap<String,String> |
getMap()
The map at represents the connection of inner path to outer path.
|
protected boolean |
isParentDir(String parent,
String child) |
protected void |
makeVolMap()
This map is a link between file paths inside the container (the containerized path) and paths outside the
container (the decontainerized path).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuiltForVersion, versionpublic BasicDockerMapper()
throws DockerVolCreationException
DockerVolCreationExceptionprotected void makeVolMap()
throws DockerVolCreationException
DockerVolCreationExceptionprotected String formatHostPath(String path)
path - A path taken from the host part of a Mount entry in the docker info.protected String formatInnerPath(String path)
path - A path taken from the target/destination part of a Mount entry in the docker info.protected String formatConfigPath(String path)
path - A path taken from the config file. Relative paths should already be converted to absolute paths.protected String getDockerInfoCmd() throws IOException, DockerVolCreationException
IOExceptionDockerVolCreationExceptionpublic TreeMap<String,String> getMap()
DockerMountMappergetMap in interface DockerMountMappergetMap in interface PathMapperpublic String asInnerPath(String path) throws DockerVolCreationException
DockerMountMapperasInnerPath in interface DockerMountMapperasInnerPath in interface PathMapperpath - A path represented as a String, representing the outer path formDockerVolCreationExceptionpublic String asOuterPath(String innerPath) throws DockerVolCreationException
DockerMountMapperasOuterPath in interface DockerMountMapperasOuterPath in interface PathMapperinnerPath - A path represented as a String, representing the inner path formDockerVolCreationException