Actions42
- Container Actions
- Image Actions
- Network Actions
- System Actions
- Volume Actions
Container → Restart
AI-generatedSummary
Restart a Docker container
Inputs
- phaseTwoNotice — Phase 6 keeps the main Docker node AI-usable for JSON and text operations across containers, images, networks, volumes, and daemon metadata, while Docker Files remains dedicated to binary archives, Docker Build handles long-running tar workflows, and Docker Trigger owns event subscriptions.
- containerId (required) — Container name or full/short container ID
- timeoutSeconds — How long Docker should wait before forcing the action
Output shape
A success response containing the restarted container object (or no body — success/failure only)
The operation returns a JSON payload representing the container after restart; fields are optional and may vary by Docker version.
Examples
Example 1: Restart a running container named my-app
containerId: "my-app", timeoutSeconds: 10
Example 2: Restart a container with short ID cd17c922acd6 using default timeout
containerId: "cd17c922acd6"
Example 3: Restart a container but abort if it takes longer than 5 seconds
containerId: "web", timeoutSeconds: 5