-
Remove dangling images
docker rmi $(docker images -f "dangling=true" -q)
-
List current images
docker image ls
-
Remove all unused images
docker image prune -a
- Wipe out all
docker rm $(docker ps -a -q)
docker rm $(docker ps -q -f status=exited)
docker system prune -a --volumes
docker logs -t --tail 1000 <container_name> 2>&1 | grep -i error
- Running
docker stats
you’ll know about CPU, memory and network usages and if some container is not performing well you can always stop it
RUN apt-get install -y foo bar && \
# use the packages downloaded
... &&\
rm -rf /var/lib/apt/lists/*