07 commands - KleberVales/Dominando-Docker GitHub Wiki
Docker
Remove the existing container
docker rm -f container_name
Application with file docker-compose.yml
Start the services defined in the docker-compose.yml file.
docker compose up
Run in the background (detached mode): Free up the terminal while the containers continue running.
docker compose up -d
Forcing image rebuilding: Useful when you change the Dockerfile or the project's source code.
docker compose up --build
To stop and remove containers: Stop the containers and remove the networks created by Compose.
docker compose down
To stop, also remove the volumes (saved data):
docker compose down -v
View the service logs:
docker compose logs -f
Check the status of active containers
docker compose ps