- List all docker containers
docker container ls -a
- List port mappings or a specific mapping for the container -> see the port to your pg instance exposed from whichever db container I want to connect to
docker port <db container id>
- Remove the volumes
docker compose down -v
- Prune the system
docker system prune -af
- Not docker, but useful to see all open files
lsof -i
- Show running containers
docker ps
- Shows running and stopped containers
docker ps -a
*maybe of note: docker compose down
is to spin down docker-compose.yml
and when you do docker compose down -v
it removes volumes as it spins down..
docker compose up spin up docker-compose.yml
- remove volumes not used by a container if you forget the -v
docker volume prune
- also https://docs.docker.com/engine/reference/run/ this is a great reference spot too