docker ps
docker compose up
docker compose down
-d
flag: run in background
docker exec -it
interact with a container in terminal
How to delete data in a docker container?
- data (like database) is stored in volume
- will not be deleted when the container is deleted
docker volume rm volume-name
volume-name is defined in compose.yaml
Test internet connection inside docker
docker run busybox ping google.com
how to stop docker container from auto starting
docker update --restart=no container_name