Actions88
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Network Actions
- Volume Actions
- Swarm Actions
- Node Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
Overview
This node allows you to interact with Docker containers through the Portainer API. Specifically, the "Container Inspect" operation retrieves detailed information about a specified Docker container by its ID or name. This is useful for scenarios where you need to programmatically access container metadata, configuration, state, and resource usage details within an automated workflow.
Practical examples include:
- Monitoring container status and configuration in real-time.
- Automating audits of container setups.
- Integrating container inspection data into dashboards or reports.
- Triggering conditional workflows based on container properties.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The Portainer endpoint to use for accessing the Docker API. You can select from a list of available endpoints or specify one via expression. |
| Id | The ID or name of the Docker container you want to inspect. |
| Additional Fields | Optional extra parameters: • Size: Boolean flag to include the container size information ( SizeRw and SizeRootFs) in the response. |
Output
The node outputs JSON data representing the full inspection details of the specified Docker container. This includes container configuration, state, network settings, mounts, image details, and optionally size metrics if requested.
If the "Size" option is enabled, the output will also contain fields such as:
SizeRw: Size of the writable layer.SizeRootFs: Total size of the container's root filesystem.
No binary data output is produced by this node.
Dependencies
- Requires a valid Portainer API endpoint URL and an API authentication token configured in the node credentials.
- The node uses the Portainer API to communicate with Docker endpoints.
- The user must have appropriate permissions on the Portainer instance to query container details.
Troubleshooting
Common issues:
- Invalid or missing endpoint ID: Ensure the selected endpoint exists and is accessible.
- Incorrect container ID or name: Verify the container identifier is correct and the container exists on the target Docker host.
- Authentication errors: Confirm that the API key or token used has sufficient privileges.
- Network connectivity problems between n8n and the Portainer server.
Error messages:
- 404 Not Found: Container ID does not exist on the specified endpoint.
- 401 Unauthorized: Authentication failed; check API credentials.
- 500 Internal Server Error: Possible server-side issue; verify Portainer health and logs.
Resolving these typically involves verifying input parameters, credentials, and network access.