Class DockerCopyFileFromContainer

java.lang.Object
org.gradle.api.internal.AbstractTask
All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, Configurable<Task>

public class DockerCopyFileFromContainer extends DockerExistingContainer
  • Constructor Details

  • Method Details

    • getRemotePath

      @Input public final Property<String> getRemotePath()
      Path inside container
    • getHostPath

      @Input public final Property<String> getHostPath()
      Path on host to write remotePath to or into.

      If hostPath does not exist it will be created relative to what we need it to be (e.g. regular file or directory). This is consistent with how 'docker cp' behaves.

    • getCompressed

      @Input @Optional public final Property<Boolean> getCompressed()
      Whether to leave file in its compressed state or not.

      Docker CP command hands back a tar stream regardless if we asked for a regular file or directory. Thus, we can give the caller back the tar file as-is or explode it to some destination like 'docker cp' does.

    • runRemoteCommand

      public void runRemoteCommand() throws IOException
      Specified by:
      runRemoteCommand in class AbstractDockerRemoteApiTask
      Throws:
      IOException