github.com/feiyang21687/docker@v1.5.0/docs/sources/installation/fedora.md (about)

     1  page_title: Installation on Fedora
     2  page_description: Instructions for installing Docker on Fedora.
     3  page_keywords: Docker, Docker documentation, Fedora, requirements, linux
     4  
     5  # Fedora
     6  
     7  Docker is supported on the following versions of Fedora:
     8  
     9  - [*Fedora 20 (64-bit)*](#fedora-20-installation)
    10  - [*Fedora 21 and later (64-bit)*](#fedora-21-and-later-installation)
    11  
    12  Currently the Fedora project will only support Docker when running on kernels
    13  shipped by the distribution. There are kernel changes which will cause issues
    14  if one decides to step outside that box and run non-distribution kernel packages.
    15  
    16  ## Fedora 21 and later installation
    17  
    18  Install the `docker` package which will install Docker on our host.
    19  
    20      $ sudo yum -y install docker
    21  
    22  To update the `docker` package:
    23  
    24      $ sudo yum -y update docker
    25  
    26  Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon).
    27  
    28  ## Fedora 20 installation
    29  
    30  For `Fedora 20`, there is a package name conflict with a system tray application
    31  and its executable, so the Docker RPM package was called `docker-io`.
    32  
    33  To proceed with `docker-io` installation on Fedora 20, please remove the `docker`
    34  package first.
    35  
    36      $ sudo yum -y remove docker
    37      $ sudo yum -y install docker-io
    38  
    39  To update the `docker` package:
    40  
    41      $ sudo yum -y update docker-io
    42  
    43  Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon).
    44  
    45  ## Starting the Docker daemon
    46  
    47  Now that it's installed, let's start the Docker daemon.
    48  
    49      $ sudo systemctl start docker
    50  
    51  If we want Docker to start at boot, we should also:
    52  
    53      $ sudo systemctl enable docker
    54  
    55  Now let's verify that Docker is working.
    56  
    57      $ sudo docker run -i -t fedora /bin/bash
    58  
    59  > Note: If you get a `Cannot start container` error mentioning SELinux
    60  > or permission denied, you may need to update the SELinux policies.
    61  > This can be done using `sudo yum upgrade selinux-policy` and then rebooting.
    62  
    63  ## Granting rights to users to use Docker
    64  
    65  The `docker` command line tool contacts the `docker` daemon process via a
    66  socket file `/var/run/docker.sock` owned by `root:root`. Though it's
    67  [recommended](https://lists.projectatomic.io/projectatomic-archives/atomic-devel/2015-January/msg00034.html)
    68  to use `sudo` for docker commands, if users wish to avoid it, an administrator can
    69  create a `docker` group, have it own `/var/run/docker.sock`, and add users to this group.
    70  
    71      $ sudo groupadd docker
    72      $ sudo chown root:docker /var/run/docker.sock
    73      $ sudo usermod -a -G docker $USERNAME
    74  
    75  ## Custom daemon options
    76  
    77  If you need to add an HTTP Proxy, set a different directory or partition for the
    78  Docker runtime files, or make other customizations, read our Systemd article to
    79  learn how to [customize your Systemd Docker daemon options](/articles/systemd/).
    80  
    81  ## What next?
    82  
    83  Continue with the [User Guide](/userguide/).
    84