public InputStream getFileOrDirectoryFromContainerAsTar(String containerId, String from) { this.readWriteLock.readLock().lock(); try { InputStream response = dockerClient.copyFileFromContainerCmd(containerId, from).exec(); return response; } finally { this.readWriteLock.readLock().unlock(); } }
public InputStream getFileOrDirectoryFromContainerAsTar(String containerId, String from) { this.readWriteLock.readLock().lock(); try { InputStream response = dockerClient.copyFileFromContainerCmd(containerId, from).exec(); return response; } finally { this.readWriteLock.readLock().unlock(); } }
try { InputStream is = docker.copyFileFromContainerCmd(container.getId(), resource).withHostPath(hostpath).exec(); final TarArchiveInputStream tais = (TarArchiveInputStream) new ArchiveStreamFactory().createArchiveInputStream("tar", is); File targetPath = new File(hostpath); // hostpath could be a file or a directory
break; case COPY_FILE_CONTAINER: result = executeCopyFileContainerRequest(client, message).exec(); break; case CREATE_CONTAINER: