Launches a temporary debug shell using the service image.
Section: Debugging and Troubleshooting
Start ephemeral debug shell
bash
bash
docker compose run --rm --entrypoint sh apiExplanation
Useful when startup scripts or commands are failing.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Debugging and Troubleshooting
List all containers including stopped
Shows current and exited containers for the project.
Validate effective config
Checks whether the Compose config is valid without printing it.
Inspect runtime env
Prints environment variables inside the running service.
Print container mounts and settings
Inspects the underlying container created for a service.
Watch files and sync/rebuild
Watches project files and applies sync or rebuild actions when configured.