Actions42
- Container Actions
- Image Actions
- Network Actions
- System Actions
- Volume Actions
Container → Write Text File
AI-generatedSummary
Write a text file into a Docker container
Inputs
- containerId (required) — Container name or full/short container ID
- workingPath — Absolute path inside the container. Relative file paths resolve from here. Linux containers only.
- filePath (required) — Absolute path, or a path relative to Working Path
- content (required) — UTF-8 text to write into the target file
- createParentDirectories — Whether to run a fixed /bin/sh mkdir step before uploading the file. Linux containers only.
Output shape
no body — operation is side‑effect only
On success nothing is returned; on failure an error is propagated.
Examples
Example 1: Write a configuration file to /workspace/app/config.json
containerId: mycontainer, workingPath: /workspace, filePath: app/config.json, content: '{ "debug": true }', createParentDirectories: true
Example 2: Append log output to /var/log/app.log
containerId: logs, workingPath: /var/log, filePath: app.log, content: "Log entry", createParentDirectories: false