Docker: Difference between revisions

From DWIKI
Line 9: Line 9:
*[https://training.play-with-docker.com/beginner-linux/ Docker for beginners]
*[https://training.play-with-docker.com/beginner-linux/ Docker for beginners]
*[https://runnable.com/docker/basic-docker-networking Docker networking]
*[https://runnable.com/docker/basic-docker-networking Docker networking]
*[https://docs.docker.com/config/pruning/ Docker pruning]


=HOWTO=
=HOWTO=

Revision as of 15:27, 15 February 2023

Links


Docs

HOWTO

List running containers

docker ps

List containers

docker ps -a


List images

docker images

Get shell in running container

To get image name

docker ps

then

docker exec -it <image-id> bash

Network

docker network ls
docker network inspect


image has dependent child images

docker inspect --format='Template:.Id Template:.Parent' $(docker images --filter since=<image_id> -q)

Dangling images

list dangling images

docker images -f dangling=true

Remove dangling image

docker rmi image-id

Remove all dangling images

docker rmi $(docker images -f dangling=true -q)

image is being used by stopped container xyz

docker rm xyz

and try again


Backups

FAQ