/** * Obtain a path that the Docker daemon should be able to use to volume mount a file/resource * into a container. If this is a classpath resource residing in a JAR, it will be extracted to * a temporary location so that the Docker daemon is able to access it. * * @return a volume-mountable path. */ private String resolvePath() { String result = getResourcePath(); if (SystemUtils.IS_OS_WINDOWS && result.startsWith("/")) { result = result.substring(1); } return result; }
/** * Obtain a path in local filesystem that the Docker daemon should be able to use to volume mount a file/resource * into a container. If this is a classpath resource residing in a JAR, it will be extracted to * a temporary location so that the Docker daemon is able to access it. * * TODO: rename method accordingly and check if really needed like this * * @return */ private String resolveFilesystemPath() { String result = getResourcePath(); if (SystemUtils.IS_OS_WINDOWS && result.startsWith("/")) { result = PathUtils.createMinGWPath(result).substring(1); } return result; }
/** * Obtain a path in local filesystem that the Docker daemon should be able to use to volume mount a file/resource * into a container. If this is a classpath resource residing in a JAR, it will be extracted to * a temporary location so that the Docker daemon is able to access it. * * TODO: rename method accordingly and check if really needed like this * * @return */ private String resolveFilesystemPath() { String result = getResourcePath(); if (SystemUtils.IS_OS_WINDOWS && result.startsWith("/")) { result = PathUtils.createMinGWPath(result).substring(1); } return result; }