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 [2015-04-09 16:56] glen [PLD Base image] |
packages:docker [2016-05-31 07:50] glen [Getting rid of unused images] |
||
---|---|---|---|
Line 3: | Line 3: | ||
[[https://www.docker.io/|Docker, The Linux container engine]] is an open source project to pack, ship and run any application as a lightweight container. | [[https://www.docker.io/|Docker, The Linux container engine]] is an open source project to pack, ship and run any application as a lightweight container. | ||
- | Have look at Docker [[https://www.docker.io/gettingstarted/|getting started]]. | + | Have look at Docker [[https://docs.docker.com/linux/|getting started]]. |
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | [[docs:lxc#prerequisites|LXC]] with ''USER_NS'', ''USER_NET'', etc. | + | [[packages:kernel]] with ''USER_NS'', ''USER_NET'', etc. |
+ | |||
+ | ==== Setup Cgroups ==== | ||
+ | |||
+ | Easiest way is to install [[package>libcgroup]] package and enable all cgroup types: | ||
+ | |||
+ | <code> | ||
+ | # install libcgroup and enable mounts | ||
+ | poldek -u --noask libcgroup | ||
+ | sed -i -e '/^#mount/,$ s/^#//' /etc/cgconfig.conf | ||
+ | service cgconfig start | ||
+ | </code> | ||
===== Network Configuration ===== | ===== Network Configuration ===== | ||
Line 23: | Line 34: | ||
Or, to enable it more permanently, enable it on the host's **/etc/sysctl.conf**: | Or, to enable it more permanently, enable it on the host's **/etc/sysctl.conf**: | ||
- | net.ipv4.ip_forward=1 | + | net.ipv4.ip_forward=1 |
+ | |||
+ | ===== How To ===== | ||
+ | |||
+ | ==== Maintenance ==== | ||
+ | |||
+ | Getting rid of unused images | ||
+ | |||
+ | <code> | ||
+ | docker images --filter dangling=true | ||
+ | docker rmi $(docker images --filter dangling=true --quiet) | ||
+ | </code> | ||
+ | Getting rid of unused volumes | ||
+ | <code> | ||
+ | $ docker volume ls -qf 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 ===== | ||