public synchronized static RegistryAuthLocator instance() { if (instance == null) { instance = new RegistryAuthLocator(); } return instance; }
/** * @return a logger */ private Logger logger() { return DockerLoggerFactory.getLogger(COMPOSE_EXECUTABLE); } }
/** * Obtains a {@link MountableFile} corresponding to a file on the docker host filesystem. * * @param path the path to the resource * @return a {@link MountableFile} that may be used to obtain a mountable path */ public static MountableFile forHostPath(final Path path) { return forHostPath(path, null); }
@Test public void forClasspathResource() throws Exception { final MountableFile mountableFile = MountableFile.forClasspathResource("mappable-resource/test-resource.txt"); performChecks(mountableFile); }
public boolean isGreaterThanOrEqualTo(String other) { return this.compareTo(new ComparableVersion(other)) >= 0; } }
@Override public int getFileMode() { return getUnixFileMode(this.getResolvedPath()); }
public void followOutput(DockerClient dockerClient, String containerId, Consumer<OutputFrame> consumer) { followOutput(dockerClient, containerId, consumer, STDOUT, STDERR); }
/** * {@inheritDoc} */ @Override public void transferTo(final TarArchiveOutputStream outputStream, String destinationPathInTar) { recursiveTar(destinationPathInTar, this.getResolvedPath(), this.getResolvedPath(), outputStream); }
@Override protected boolean isApplicable() { return DockerMachineClient.instance().isInstalled(); }
@Override public String toString() { if (versioning == null) { return getUnversionedPart(); } else { return getUnversionedPart() + versioning.getSeparator() + versioning.toString(); } }
@Override public String getDescription() { return this.getResolvedPath(); }
public RemoteDockerImage(String dockerImageName) { imageName = new DockerImageName(dockerImageName); }
public synchronized static ResourceReaper instance() { if (instance == null) { instance = new ResourceReaper(); } return instance; }
@Override protected boolean isApplicable() { final boolean nettyDoesSupportMacUnixSockets = SystemUtils.IS_OS_MAC_OSX && ComparableVersion.OS_VERSION.isGreaterThanOrEqualTo("10.12"); return SystemUtils.IS_OS_LINUX || nettyDoesSupportMacUnixSockets; }
/** * Removes a network by ID. * @param id */ public void removeNetworkById(String id) { removeNetwork(id); }
/** * Obtain an instance of the DockerMachineClient wrapper. * * @return the singleton instance of DockerMachineClient */ public synchronized static DockerMachineClient instance() { if (instance == null) { instance = new DockerMachineClient(); } return instance; }
@Override public T get() throws InterruptedException, ExecutionException { return getResolvedValue(); }
@Test public void forClasspathResourceWithAbsolutePath() throws Exception { final MountableFile mountableFile = MountableFile.forClasspathResource("/mappable-resource/test-resource.txt"); performChecks(mountableFile); }
@Test public void forClasspathResourceFromJar() throws Exception { final MountableFile mountableFile = MountableFile.forClasspathResource("META-INF/dummy_unique_name.txt"); performChecks(mountableFile); }
@Test public void forClasspathResourceFromJarWithAbsolutePath() throws Exception { final MountableFile mountableFile = MountableFile.forClasspathResource("/META-INF/dummy_unique_name.txt"); performChecks(mountableFile); }