This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
packages:docker [2016-02-16 12:02] glen [Prerequisites] |
packages:docker [2016-06-18 10:39] glen add addgroup notice |
||
---|---|---|---|
Line 36: | Line 36: | ||
net.ipv4.ip_forward=1 | net.ipv4.ip_forward=1 | ||
+ | |||
+ | ===== Rights ===== | ||
+ | |||
+ | Don't run docker as ''root''. Add your user to ''docker'' group in host to be able to run from your own user. | ||
+ | |||
+ | <note tip> | ||
+ | By adding yourself to the docker group you are effectively granting yourself full root permissions. For more information please read [[https://www.andreas-jung.com/contents/on-docker-security-docker-group-considered-harmful|On Docker security: docker group considered harmful]]. | ||
+ | </note> | ||
+ | |||
+ | Whoever, we still consider that more secure approach than just running as root. Accidental damage to Host system is minimized this way. | ||
===== How To ===== | ===== How To ===== | ||
- | ==== Getting rid of unused images ==== | + | ==== Maintenance ==== |
+ | |||
+ | Getting rid of stopped containers | ||
<code> | <code> | ||
+ | docker ps -f status=exited | ||
+ | docker ps -q -f status=exited | xargs -r docker rm | ||
+ | </code> | ||
+ | |||
+ | Getting rid of unused images | ||
+ | |||
+ | <code> | ||
+ | docker images --filter dangling=true | ||
docker rmi $(docker images --filter dangling=true --quiet) | docker rmi $(docker images --filter dangling=true --quiet) | ||
</code> | </code> | ||
+ | |||
+ | Getting rid of unused volumes | ||
+ | <code> | ||
+ | docker volume ls -f dangling=true | ||
+ | docker volume ls -qf dangling=true | xargs -r docker volume rm | ||
+ | </code> | ||
+ | |||
+ | For Docker < 1.9, see [[https://github.com/chadoe/docker-cleanup-volumes|docker-cleanup-volumes]] tool. | ||
===== PLD Base image ===== | ===== PLD Base image ===== | ||