Actions107
- Node Actions
- Network Actions
- 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
- Volume Actions
- Swarm Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
- Config Actions
- Plugin Actions
- Distribution Actions
- Session Actions
Overview
This node allows users to interact with Docker through the Portainer API, specifically focusing on network-related operations. The "Network Connect" operation enables connecting a container to a specified Docker network by providing the network ID or name and the container identifier. This is useful in scenarios where containers need to be dynamically attached to different networks for communication, isolation, or configuration purposes.
Practical examples include:
- Connecting a newly created container to an existing Docker network.
- Dynamically managing container network attachments in multi-container applications.
- Automating network configurations in CI/CD pipelines or infrastructure orchestration workflows.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The Portainer endpoint to use for accessing Docker. Choose from a list of available endpoints or specify an ID using an expression. |
| Id | The Docker network's ID or name to which the container will be connected. |
| Container | The identifier (name or ID) of the container that should be connected to the specified network. |
Output
The node outputs JSON data representing the result of the network connection operation. This typically includes confirmation details about the container's network attachment status or any error messages returned by the Portainer API. There is no binary data output involved.
Dependencies
- Requires access to a Portainer API instance.
- Needs an API authentication token configured as credentials within n8n to authorize requests.
- The node uses the Portainer API endpoint URL and selected endpoint ID to route requests properly.
Troubleshooting
Common issues:
- Invalid or missing endpoint ID can cause failure to connect to the Docker environment.
- Incorrect network ID or container name may result in errors indicating the resource was not found.
- Insufficient permissions or invalid API credentials can lead to authorization errors.
Error messages and resolutions:
- "Endpoint not found": Verify the endpoint ID is correct and accessible.
- "Network not found": Confirm the network ID or name exists in the Docker environment.
- "Container not found": Ensure the container identifier is valid and the container is running.
- Authorization errors: Check that the API key or token is valid and has sufficient privileges.