Starts a fresh container for a one-off task and removes it after exit.
Section: Logs, Exec, and Shell Access
Run one-off command
bash
bash
docker compose run --rm web python manage.py migrateExplanation
Useful for migrations, tests, or generators.
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 Logs, Exec, and Shell Access
Open shell in running service
Executes a shell inside an already-running service container.
Open bash in running service
Runs Bash inside the running service container.
Show running processes
Displays processes running inside service containers.