Table of contents
  1. stop all containers:
  2. remove all containers
  3. remove all docker images
  4. get container ip




stop all containers:

docker kill $(docker ps -q)

remove all containers

docker rm $(docker ps -a -q)

remove all docker images

docker rmi $(docker images -q)

get container ip

sudo docker container inspect container_name_or_ID

Don’t know the container’s name or ID? Use the command

sudo docker ps