The Docker API provides endpoints to manage and inspect Docker containers across your infrastructure.
Get Containers
curl -X GET "https://your-dokploy-instance.com/api/docker.getContainers?serverId=server_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Retrieve all Docker containers running on a server.
Query Parameters
The ID of the server to retrieve containers from. If not provided, returns containers from the local server.
Response
Returns an array of container objects with detailed information about each container.
Restart Container
curl -X POST "https://your-dokploy-instance.com/api/docker.restartContainer" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"containerId": "my-app-container"
}'
Restart a specific Docker container.
Body Parameters
The ID or name of the container to restart. Must match the pattern ^[a-zA-Z0-9.\-_]+$.
Get Container Configuration
curl -X GET "https://your-dokploy-instance.com/api/docker.getConfig?containerId=my-app&serverId=server_123" \
-H "Authorization: Bearer YOUR_API_KEY"
Retrieve the configuration details of a specific container.
Query Parameters
The ID or name of the container. Must match the pattern ^[a-zA-Z0-9.\-_]+$.
The ID of the server where the container is running.
Response
Returns the complete Docker container configuration including environment variables, volumes, networks, and resource limits.
Get Containers by App Name Match
curl -X GET "https://your-dokploy-instance.com/api/docker.getContainersByAppNameMatch?appName=myapp&appType=stack" \
-H "Authorization: Bearer YOUR_API_KEY"
Find containers that match a specific application name pattern.
Query Parameters
The application name to search for. Must match the pattern ^[a-zA-Z0-9.\-_]+$.
Type of application to filter by.
stack - Docker Stack applications
docker-compose - Docker Compose applications
The ID of the server to search on.
Get Containers by App Label
curl -X GET "https://your-dokploy-instance.com/api/docker.getContainersByAppLabel?appName=myapp&type=standalone" \
-H "Authorization: Bearer YOUR_API_KEY"
Retrieve containers filtered by application label and deployment type.
Query Parameters
The application name label to search for. Must match the pattern ^[a-zA-Z0-9.\-_]+$.
Deployment type to filter by.
standalone - Standalone container deployments
swarm - Docker Swarm service deployments
The ID of the server to query.
Get Stack Containers by App Name
curl -X GET "https://your-dokploy-instance.com/api/docker.getStackContainersByAppName?appName=mystack" \
-H "Authorization: Bearer YOUR_API_KEY"
Get all containers belonging to a Docker Stack application.
Query Parameters
The stack application name. Must match the pattern ^[a-zA-Z0-9.\-_]+$.
The ID of the server where the stack is deployed.
Get Service Containers by App Name
curl -X GET "https://your-dokploy-instance.com/api/docker.getServiceContainersByAppName?appName=myservice" \
-H "Authorization: Bearer YOUR_API_KEY"
Retrieve all containers associated with a specific Docker service.
Query Parameters
The service application name. Must match the pattern ^[a-zA-Z0-9.\-_]+$.
The ID of the server where the service is running.
Response
Returns an array of containers that are part of the specified service, including their current status and configuration.