Docker – Good to know
I don’t run docker containers locally, but on a docker VM on a remote server.
Management is done through Portainer.io which adds a nice GUI to Docker and Kubernetes.
However sometimes, the CLI is still the place to be:
Useful commands:
docker run –rm -it
docker ps = list all active containers
docker attach
docker exec -it
Build Images:
docker build -t
docker run -it
Cleanup
docker system df = show total and active images, container,…
docker container ls -s = how much space is taken by a container
docker volume inspect
docker container rm $(docker container ls –filter “status=exited” -aq) = cleanup docker-container!
docker rmi $(docker image ls -aq) = cleanup docker images!
docker system prune = remove all unused stuff!!