large disk usage
- find large log and remove
$ for name in $(docker ps -a | awk '{print $1}' | grep -v CONTAINER); do docker inspect $name | grep LogPath | awk '{print $NF}' | tr -d '",' |xargs du -sh;done
-
tune log config at /etc/docker/daemon.json
- remove unused images, like
intermediate images, unused and not reference as well for images_id_1 in `docker images | awk '$2 ~ "<none>"{print $3}'` do docker rmi $images_id_1 done
- namespace
lsns -p <pid> unshare nsenter -t <pid> -u command
- cgroup
/sys/fs/cgroup/memory/foo/memory.limit_in_bytes echo 2428 > /sys/fs/cgroup/memory/foo/cgroup.procs ps -o cgroup 2428