Docker quick ref :whale:
-
Most used commands:
docker ps,docker images,docker build,docker run -
Most used docker-run flags:
-itinteractive terminal,-ddetached (in the background) -
Detach from running container: Ctrl P Q
-
Remove all non-running images:
docker rmi $(docker ps -aq)ordocker image prune -a -
Check disk usage:
docker system df -
Exec as specific user:
docker exec -u root -it <containername> -
Run container with the same network namespace as another:
docker run -it --network container:<containername> alpine