diff --git a/docker/tricks.md b/docker/tricks.md new file mode 100644 index 0000000..18491cb --- /dev/null +++ b/docker/tricks.md @@ -0,0 +1,43 @@ +## useful tricks for docker + +
+ + +#### shared folders + +Removing some of the default shared folders can decrease CPU usage (e.g. remove `/Volumes` and `/private`). + +Check storage with: + +``` +docker info |grep Storage +``` + + +
+ +#### performance + +In case of performance problems you can run: + +``` +docker run --rm=true -it --privileged --pid=host \ + /usr/bin/top +``` + +
+ +#### cleaning up + +See disk space: + +``` +docker system df +``` + + +Remove stopped containers, dangling images, the build cache, and unused networks: + +``` +docker system prune +```