docker ps shows running containers, amd docker container ls lists available containers
docker ps
docker container ls
docker ps shows running containers, amd docker container ls lists available containers
docker image ls
after listing containers you can remove them by id or name
docker stop <container_id or name>
docker rm <container_id or name>
# for a deep clean you can run
docker system prune
getting into the container's shell via the interactive shell (interactive TTY) can be done with:
docker container run -it ubuntu bash
the following command pulls the nginx image and exposes it on localhost:80
docker container run --publish 80:80 nginx
we can use top, inspect or tail the logs
docker container run -d --name nginx --publish 80:80 nginx
docker top nginx
docker inspect nginx
docker container stats