Docker icon

Docker

Interact with Docker via Portainer API

Actions107

Overview

This node allows users to interact with Docker through the Portainer API, specifically focusing on managing Docker configurations. The "Config Delete" operation enables deleting a specific Docker config by its ID within a selected Portainer endpoint. This is useful in scenarios where you need to programmatically clean up or remove obsolete Docker configs managed via Portainer.

Practical examples include:

  • Automating cleanup of unused Docker configs in CI/CD pipelines.
  • Managing Docker configs across multiple environments by selecting different endpoints.
  • Integrating Docker config management into broader infrastructure automation workflows.

Properties

Name Meaning
EndpointID Name or ID Selects the Portainer endpoint to target for the Docker API request. Options are dynamically loaded from available endpoints. You can choose from the list or specify an ID using an expression.
Id The unique identifier of the Docker config to delete. This is a required string input specifying which config to remove.

Output

The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified Docker config. Typically, this will confirm success or provide error details if the deletion failed.

No binary data output is involved.

Dependencies

  • Requires access to a Portainer instance with the Docker environment configured.
  • Needs an API key credential for authenticating requests to the Portainer API.
  • The node uses the Portainer API endpoint /api/endpoints/{endpointId}/docker/configs/{id} to perform the delete operation.
  • The base URL and authentication credentials must be configured in the node's credentials settings.

Troubleshooting

  • Common issues:

    • Invalid or missing endpointId: Ensure the endpoint exists and is accessible.
    • Incorrect id for the config: Verify the config ID is correct and exists in the selected endpoint.
    • Authentication errors: Confirm that the API key credential is valid and has sufficient permissions.
    • Network connectivity problems to the Portainer server.
  • Error messages:

    • HTTP 404 Not Found: The specified config ID does not exist on the selected endpoint.
    • HTTP 401 Unauthorized or 403 Forbidden: Authentication failed or insufficient permissions.
    • Timeout or network errors: Check network connectivity and Portainer server status.

Resolving these typically involves verifying inputs, credentials, and network access.

Links and References

Discussion