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