Article metadata
- Copyright CC BY-SA 4.0. See licensing for additional details
- Author
- Created 2015-05-23
- Last updated: 2015-05-23
- Changes
- 2015-05-23: Initial creation
Docker on Development machine
Install based on the "Official way"1
/etc/portage/package.use
app-emulation/docker btrfs -aufs -device-mapper contrib doc vim-syntax
Attempt to install and get package.accept_keyword mods
emerge --ask app-emulation/docker
/etc/portage/package.accept_keywords
# Required by docker sys-fs/btrfs-progs ~amd64 app-emulation/docker ~amd64
Install for real
emerge --ask app-emulation/docker
Verify all required kernel settings are enabled based on output of package. In this case I need to rebuild kernel with the following.
* CONFIG_DEVPTS_MULTIPLE_INSTANCES: is not set when it should be. * CONFIG_CGROUP_DEVICE: is not set when it should be. * CONFIG_CGROUP_FREEZER: is not set when it should be. * CONFIG_MACVLAN: is not set when it should be. * CONFIG_VETH: is not set when it should be. * CONFIG_BRIDGE: is not set when it should be. * CONFIG_NF_NAT_IPV4: is not set when it should be. * CONFIG_IP_NF_FILTER: is not set when it should be. * CONFIG_IP_NF_TARGET_MASQUERADE: is not set when it should be. * CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: is not set when it should be. * CONFIG_NETFILTER_XT_MATCH_CONNTRACK: is not set when it should be. * CONFIG_NF_NAT: is not set when it should be. * CONFIG_NF_NAT_NEEDED: is not set when it should be. * CONFIG_MEMCG_SWAP: is required if you wish to limit swap usage of containers * CONFIG_RESOURCE_COUNTERS: is optional for container statistics gathering * CONFIG_CGROUP_PERF: is optional for container statistics gathering
Rebuild after kernel updated in case anything was excluded due to to kernel
emerge --ask app-emulation/docker
Update kernel with new optional settings
CONFIG_CFS_BANDWIDTH: is optional for container statistics gathering
Rebuild after kernel updated in case anything was excluded due to to kernel
emerge --ask app-emulation/docker
Allow me to start containers
sudo usermod -a -G docker whk
Start docker manually
sudo service docker start
Verify basic functionality2
# Force docker group on account since already logged in newgrp docker # Pull busybox layer docker pull busybox:latest # Verify busybox works docker run -it --rm busybox
Install Docker Compose
/etc/portage/package.accept_keywords
# required by app-emulation/docker-compose-1.2.0-r1::gentoo # required by app-emulation/docker-compose (argument) dev-python/docker-py ~amd64 # required by app-emulation/docker-compose (argument) app-emulation/docker-compose ~amd64 # required by app-emulation/docker-compose-1.2.0-r1::gentoo # required by app-emulation/docker-compose (argument) dev-python/dockerpty ~amd64 # required by app-emulation/docker-compose-1.2.0-r1::gentoo # required by app-emulation/docker-compose (argument) dev-python/texttable ~amd64
Install
emerge app-emulation/docker-compose
References
Docker. “Busybox Repository | Docker Hub Registry - Repositories of Docker Images.” Accessed May 24, 2015. https://registry.hub.docker.com/_/busybox/.
———. “Gentoo - Docker Documentation V1.4.” Accessed January 31, 2015. https://docs.docker.com/installation/gentoolinux/.