Docker Commands
Useful commands for docker environment.
Launch docker environment containers
Run docker compose up -d with host bash in the project root directory.
Use --force-recreate to force the recreation of containers.
Destroy docker environment containers
Run docker compose down with host bash in the project root directory.
Restart a single container
Run docker container restart with host bash in the project root directory or use action button in the PhpStorm container view.
Open a container terminal
Run docker exec -it with host bash in the project root directory or open Docker Desktop and open a terminal in the PhpStorm container view.
Show containers statistics
Run docker stats
Tip
If you use PhpStorm, you can use service view to perform main actions. You can also find plugin for Visual Studio Code.