Docker Files icon

Docker Files

Copy files to and from Docker containers, export container filesystems, and save or load Docker image tar archives

Actions5

Container → Copy To

AI-generated

Summary

Uploads a binary file from an n8n item as a tar archive into a Docker container, extracting it to a specified target path.

Inputs

  • containerId (required) — Container name or full/short container ID.
  • binaryPropertyName (required) — Name of the binary property on the input item containing the file to upload.
  • targetPath (required) — Directory inside the container where the uploaded tar archive will be extracted.
  • fileName — Optional file name inside the generated tar archive. Defaults to the source binary file name.
  • noOverwriteDirNonDir — Whether to fail if extraction would replace a directory with a non-directory or vice versa.
  • copyUidGid — Whether to copy file ownership metadata when the daemon supports it.

Output shape

A single record with metadata about the upload (e.g., bytes, containerId, statusCode, changed).

Does not return the extracted file content; returns metadata indicating if the container archive was changed.

Examples

Example 1: Upload a local report file to a container's /tmp directory.

Source binary property: 'report', targetPath: '/tmp', fileName: 'report.txt'

Example 2: Upload a file preserving original ownership metadata.

Source binary property: 'data', targetPath: '/app/uploads', copyUidGid: true

Links

Discussion