Docker: Difference between revisions

From DWIKI
mNo edit summary
Line 10: Line 10:
*[https://runnable.com/docker/basic-docker-networking Docker networking]
*[https://runnable.com/docker/basic-docker-networking Docker networking]


=FAQ=
=HOWTO=
 
==List running containers==
==List running containers==
  docker ps
  docker ps
Line 17: Line 18:
  docker ps -a
  docker ps -a


==List images==
docker images
==Get shell in running container==
==Get shell in running container==
To get image name
To get image name
Line 33: Line 37:
==list dangling images==
==list dangling images==
  docker images -f dangling=true
  docker images -f dangling=true
==Remove dangling image==
docker rmi image-id


==image is being used by stopped container xyz==
==image is being used by stopped container xyz==
Line 42: Line 49:
*https://linuxconfig.org/docker-container-backup-and-recovery
*https://linuxconfig.org/docker-container-backup-and-recovery
*[https://bobcares.com/blog/docker-backup/ Docker - Easy backup & restore]
*[https://bobcares.com/blog/docker-backup/ Docker - Easy backup & restore]
=FAQ=

Revision as of 16:21, 9 January 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)

list dangling images

docker images -f dangling=true

Remove dangling image

docker rmi image-id

image is being used by stopped container xyz

docker rm xyz

and try again


Backups

FAQ