Container → Copy From
AI-generatedSummary
Archives and downloads a file or directory from inside a running Docker container as a tar stream, optionally extracting a single file instead of returning the raw binary.
Inputs
- containerId (required) — Container name or full/short container ID.
- sourcePath (required) — Path inside the container to archive and download.
- outputBinaryPropertyName (required) — Name of the binary property to write the resulting data to.
- extractSingleFile — Whether to unpack a single regular file from the tar archive instead of returning the raw tar binary.
Output shape
A single item with a binary property containing either the raw tar stream or the extracted file content, plus metadata in the JSON data.
If the source path points to a single file and extractSingleFile is true, the binary property contains the file content directly. If extractSingleFile is false or the path points to a directory, the binary property contains the tar archive. Metadata fields include containerId, sourcePath, and outputMode ('singleFile' or 'tar').
Examples
Example 1: Download a single log file from a container
Container ID: my-app; Source Path: /var/log/app.log; Extract Single File: true
Example 2: Export a configuration directory as a tar archive
Container ID: web-server; Source Path: /etc/nginx; Extract Single File: false