github.com/vincentwoo/docker@v0.7.3-0.20160116130405-82401a4b13c0/docs/installation/gentoolinux.md (about) 1 <!--[metadata]> 2 +++ 3 title = "Installation on Gentoo" 4 description = "Installation instructions for Docker on Gentoo." 5 keywords = ["gentoo linux, docker, documentation, installation"] 6 [menu.main] 7 parent = "smn_linux" 8 +++ 9 <![end-metadata]--> 10 11 # Gentoo 12 13 Installing Docker on Gentoo Linux can be accomplished using one of two ways: the **official** way and the `docker-overlay` way. 14 15 Official project page of [Gentoo Docker](https://wiki.gentoo.org/wiki/Project:Docker) team. 16 17 ## Official way 18 The first and recommended way if you are looking for a stable 19 experience is to use the official `app-emulation/docker` package directly 20 from the tree. 21 22 If any issues arise from this ebuild including, missing kernel 23 configuration flags or dependencies, open a bug 24 on the Gentoo [Bugzilla](https://bugs.gentoo.org) assigned to `docker AT gentoo DOT org` 25 or join and ask in the official 26 [IRC](http://webchat.freenode.net?channels=%23gentoo-containers&uio=d4) channel on the Freenode network. 27 28 ## docker-overlay way 29 30 If you're looking for a `-bin` ebuild, a live ebuild, or a bleeding edge 31 ebuild, use the provided overlay, [docker-overlay](https://github.com/tianon/docker-overlay) 32 which can be added using `app-portage/layman`. The most accurate and 33 up-to-date documentation for properly installing and using the overlay 34 can be found in the [overlay](https://github.com/tianon/docker-overlay/blob/master/README.md#using-this-overlay). 35 36 If any issues arise from this ebuild or the resulting binary, including 37 and especially missing kernel configuration flags or dependencies, 38 open an [issue](https://github.com/tianon/docker-overlay/issues) on 39 the `docker-overlay` repository or ping `tianon` directly in the `#docker` 40 IRC channel on the Freenode network. 41 42 ## Installation 43 44 ### Available USE flags 45 46 | USE Flag | Default | Description | 47 | ------------- |:-------:|:------------| 48 | aufs | |Enables dependencies for the "aufs" graph driver, including necessary kernel flags.| 49 | btrfs | |Enables dependencies for the "btrfs" graph driver, including necessary kernel flags.| 50 | contrib | Yes |Install additional contributed scripts and components.| 51 | device-mapper | Yes |Enables dependencies for the "devicemapper" graph driver, including necessary kernel flags.| 52 | doc | |Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally.| 53 | vim-syntax | |Pulls in related vim syntax scripts.| 54 | zsh-completion| |Enable zsh completion support.| 55 56 USE flags are described in detail on [tianon's 57 blog](https://tianon.github.io/post/2014/05/17/docker-on-gentoo.html). 58 59 The package should properly pull in all the necessary dependencies and 60 prompt for all necessary kernel options. 61 62 $ sudo emerge -av app-emulation/docker 63 64 >Note: Sometimes there is a disparity between the latest versions 65 >in the official **Gentoo tree** and the **docker-overlay**. 66 >Please be patient, and the latest version should propagate shortly. 67 68 ## Starting Docker 69 70 Ensure that you are running a kernel that includes all the necessary 71 modules and configuration (and optionally for device-mapper 72 and AUFS or Btrfs, depending on the storage driver you've decided to use). 73 74 To use Docker, the `docker` daemon must be running as **root**. 75 To use Docker as a **non-root** user, add yourself to the **docker** 76 group by running the following command: 77 78 $ sudo usermod -a -G docker user 79 80 ### OpenRC 81 82 To start the `docker` daemon: 83 84 $ sudo /etc/init.d/docker start 85 86 To start on system boot: 87 88 $ sudo rc-update add docker default 89 90 ### systemd 91 92 To start the `docker` daemon: 93 94 $ sudo systemctl start docker 95 96 To start on system boot: 97 98 $ sudo systemctl enable docker 99 100 If you need to add an HTTP Proxy, set a different directory or partition for the 101 Docker runtime files, or make other customizations, read our systemd article to 102 learn how to [customize your systemd Docker daemon options](../articles/systemd.md). 103 104 ## Uninstallation 105 106 To uninstall the Docker package: 107 108 $ sudo emerge -cav app-emulation/docker 109 110 To uninstall the Docker package and dependencies that are no longer needed: 111 112 $ sudo emerge -C app-emulation/docker 113 114 The above commands will not remove images, containers, volumes, or user created 115 configuration files on your host. If you wish to delete all images, containers, 116 and volumes run the following command: 117 118 $ rm -rf /var/lib/docker 119 120 You must delete the user created configuration files manually.