Useful Docker Commands

Some usefull Docker commands. Leaving these here for reference so I can find them again later.


Update all images

docker images |grep -v REPOSITORY|awk '{print $1}'|xargs -L1 docker pull

Run a command in a container

docker exec -it <container> bash|sh -c "echo hello!"


Get IP addresses from all running containers

docker inspect -f ' - ' $(docker ps -aq)

Network details

docker network inspect <network-name>

Cleaning Up

Remove all Docker images

docker rmi $(docker images -q)

Stop all containers

docker kill $(docker ps -q)


Listening To...

Recent tracks from my Last.FM profile as of

Scrobbling since 23 Dec 2006 for a total of tracks.

Thanks for visiting

Codes, builds, designs, writes about the web, and documents random thoughts.