wiki:docker_commands
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:docker_commands [2023/09/26 09:52] – add Connect to different docker daemon... antisa | wiki:docker_commands [2026/05/21 12:10] (current) – add Get IPs of all containers antisa | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| docker inspect -f ' | docker inspect -f ' | ||
| + | |||
| + | ===== Get IPs of all containers with names ===== | ||
| + | docker inspect -f ' | ||
| ===== Run kibana ===== | ===== Run kibana ===== | ||
| Line 37: | Line 40: | ||
| docker --tlsverify --tlscacert=/ | docker --tlsverify --tlscacert=/ | ||
| + | |||
| + | ===== How to determine what containers use the docker volume? ===== | ||
| + | docker ps -a --filter volume=VOLUME_NAME_OR_MOUNT_POINT | ||
| + | |||
| + | ===== Remove images older than 2 weeks ===== | ||
| + | |||
| + | docker image prune -a --filter " | ||
| + | |||
| + | The second command removes dangling build cache which will reclaim the disk space after image deletion. | ||
| + | |||
| + | ===== Print IPs for all containers ===== | ||
| + | |||
| + | docker ps -a --format "table {{.ID}}\t{{.Names}}\t{{.Image}}" | ||
| + | | tail -n +2 \ | ||
| + | | while read -r id name image; do | ||
| + | ip=$(docker inspect --format=' | ||
| + | printf " | ||
| + | done | ||
wiki/docker_commands.1695721926.txt.gz · Last modified: by antisa
