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:
docker run –rm -it = run/pull image
docker ps = list all active containers
docker exec -it
docker build -t
docker run -it
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!!