improve docs for Gentoo Linux installation

Changes summary:
    * Added available USE flags table(description included).
    * Added some tips regarding the use of docker in the Gentoo environment.
    * Sorted out docker installation ways.
    * Added information about the newly created Gentoo Docker team.
    * Misc improvements

Signed-off-by: Pavlos Ratis <dastergon@gentoo.org>
This commit is contained in:
Pavlos Ratis 2014-09-29 23:59:43 +03:00
parent 826439c537
commit f90d201d88
1 changed files with 56 additions and 32 deletions

View File

@ -4,53 +4,77 @@ page_keywords: gentoo linux, virtualization, docker, documentation, installation
# Gentoo # Gentoo
Installing Docker on Gentoo Linux can be accomplished using one of two Installing Docker on Gentoo Linux can be accomplished using one of two ways: the **official** way and the `docker-overlay` way.
methods. The first and best way if you're looking for a stable
experience is to use the official app-emulation/docker package directly
in the portage tree.
If you're looking for a `-bin` ebuild, a live ebuild, or bleeding edge Official project page of [Gentoo Docker](https://wiki.gentoo.org/wiki/Project:Docker) team.
ebuild changes/fixes, the second installation method is to use the
overlay provided at ## Official way
[https://github.com/tianon/docker-overlay](https://github.com/tianon/docker-overlay) The first and recommended way if you are looking for a stable
experience is to use the official `app-emulation/docker` package directly
from the tree.
If any issues arise from this ebuild including, missing kernel
configuration flags or dependencies, open a bug
on the Gentoo [Bugzilla](https://bugs.gentoo.org) assigned to `docker AT gentoo DOT org`
or join and ask in the official
[IRC](http://webchat.freenode.net?channels=%23gentoo-containers&uio=d4) channel on the Freenode network.
## docker-overlay way
If you're looking for a `-bin` ebuild, a live ebuild, or a bleeding edge
ebuild, use the provided overlay, [docker-overlay](https://github.com/tianon/docker-overlay)
which can be added using `app-portage/layman`. The most accurate and which can be added using `app-portage/layman`. The most accurate and
up-to-date documentation for properly installing and using the overlay up-to-date documentation for properly installing and using the overlay
can be found in [the overlay can be found in the [overlay](https://github.com/tianon/docker-overlay/blob/master/README.md#using-this-overlay).
README](https://github.com/tianon/docker-overlay/blob/master/README.md#using-this-overlay).
Note that sometimes there is a disparity between the latest version and If any issues arise from this ebuild or the resulting binary, including
what's in the overlay, and between the latest version in the overlay and and especially missing kernel configuration flags or dependencies,
what's in the portage tree. Please be patient, and the latest version open an [issue](https://github.com/tianon/docker-overlay/issues) on
should propagate shortly. the `docker-overlay` repository or ping `tianon` directly in the `#docker`
IRC channel on the Freenode network.
## Installation ## Installation
### Available USE flags
| USE Flag | Default | Description |
| ------------- |:-------:|:------------|
| aufs | |Enables dependencies for the "aufs" graph driver, including necessary kernel flags.|
| btrfs | |Enables dependencies for the "btrfs" graph driver, including necessary kernel flags.|
| contrib | Yes |Install additional contributed scripts and components.|
| device-mapper | Yes |Enables dependencies for the "devicemapper" graph driver, including necessary kernel flags.|
| doc | |Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally.|
| lxc | |Enables dependencies for the "lxc" execution driver.|
| vim-syntax | |Pulls in related vim syntax scripts.|
| zsh-completion| |Enable zsh completion support.|
USE flags are described in detail on [tianon's
blog](https://tianon.github.io/post/2014/05/17/docker-on-gentoo.html).
The package should properly pull in all the necessary dependencies and The package should properly pull in all the necessary dependencies and
prompt for all necessary kernel options. The ebuilds for 0.7+ include prompt for all necessary kernel options.
use flags to pull in the proper dependencies of the major storage
drivers, with the "device-mapper" use flag being enabled by default,
since that is the simplest installation path.
$ sudo emerge -av app-emulation/docker $ sudo emerge -av app-emulation/docker
If any issues arise from this ebuild or the resulting binary, including >Note: Sometimes there is a disparity between the latest versions
and especially missing kernel configuration flags and/or dependencies, >in the official **Gentoo tree** and the **docker-overlay**.
[open an issue on the docker-overlay repository]( >Please be patient, and the latest version should propagate shortly.
https://github.com/tianon/docker-overlay/issues) or ping
tianon directly in the #docker IRC channel on the freenode network.
Other use flags are described in detail on [tianon's
blog](https://tianon.github.io/post/2014/05/17/docker-on-gentoo.html).
## Starting Docker ## Starting Docker
Ensure that you are running a kernel that includes all the necessary Ensure that you are running a kernel that includes all the necessary
modules and/or configuration for LXC (and optionally for device-mapper modules and configuration (and optionally for device-mapper
and/or AUFS, depending on the storage driver you`ve decided to use). and AUFS or Btrfs, depending on the storage driver you've decided to use).
To use Docker, the `docker` daemon must be running as **root**.
To use Docker as a **non-root** user, add yourself to the **docker**
group by running the following command:
$ sudo usermod -a -G docker user
### OpenRC ### OpenRC
To start the docker daemon: To start the `docker` daemon:
$ sudo /etc/init.d/docker start $ sudo /etc/init.d/docker start
@ -60,10 +84,10 @@ To start on system boot:
### systemd ### systemd
To start the docker daemon: To start the `docker` daemon:
$ sudo systemctl start docker.service $ sudo systemctl start docker
To start on system boot: To start on system boot:
$ sudo systemctl enable docker.service $ sudo systemctl enable docker