github.com/jogo/docker@v1.7.0-rc1/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
    17  
    18  ### Installation
    19  
    20  Install the Docker package which will install Docker on our host.
    21  
    22      $ sudo yum -y install docker
    23  
    24  To update the Docker package:
    25  
    26      $ sudo yum -y update docker
    27  
    28  Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon).
    29  
    30  ### Uninstallation
    31  
    32  To uninstall the Docker package:
    33  
    34      $ sudo yum -y remove docker
    35  
    36  The above command will not remove images, containers, volumes, or user created
    37  configuration files on your host. If you wish to delete all images, containers,
    38  and volumes run the following command:
    39  
    40      $ rm -rf /var/lib/docker
    41  
    42  You must delete the user created configuration files manually.
    43  
    44  ## Fedora 20
    45  
    46  ### Installation
    47  
    48  For `Fedora 20`, there is a package name conflict with a system tray application
    49  and its executable, so the Docker RPM package was called `docker-io`.
    50  
    51  To proceed with `docker-io` installation on Fedora 20, please remove the `docker`
    52  package first.
    53  
    54      $ sudo yum -y remove docker
    55      $ sudo yum -y install docker-io
    56  
    57  To update the Docker package:
    58  
    59      $ sudo yum -y update docker-io
    60  
    61  Please continue with the [Starting the Docker daemon](#starting-the-docker-daemon).
    62  
    63  ### Uninstallation
    64  
    65  To uninstall the Docker package:
    66  
    67      $ sudo yum -y remove docker-io
    68  
    69  The above command will not remove images, containers, volumes, or user created
    70  configuration files on your host. If you wish to delete all images, containers,
    71  and volumes run the following command:
    72  
    73      $ rm -rf /var/lib/docker
    74  
    75  You must delete the user created configuration files manually.
    76  
    77  ## Starting the Docker daemon
    78  
    79  Now that it's installed, let's start the Docker daemon.
    80  
    81      $ sudo systemctl start docker
    82  
    83  If we want Docker to start at boot, we should also:
    84  
    85      $ sudo systemctl enable docker
    86  
    87  Now let's verify that Docker is working.
    88  
    89      $ sudo docker run -i -t fedora /bin/bash
    90  
    91  > Note: If you get a `Cannot start container` error mentioning SELinux
    92  > or permission denied, you may need to update the SELinux policies.
    93  > This can be done using `sudo yum upgrade selinux-policy` and then rebooting.
    94  
    95  ## Granting rights to users to use Docker
    96  
    97  The `docker` command line tool contacts the `docker` daemon process via a
    98  socket file `/var/run/docker.sock` owned by `root:root`. Though it's
    99  [recommended](https://lists.projectatomic.io/projectatomic-archives/atomic-devel/2015-January/msg00034.html)
   100  to use `sudo` for docker commands, if users wish to avoid it, an administrator can
   101  create a `docker` group, have it own `/var/run/docker.sock`, and add users to this group.
   102  
   103      $ sudo groupadd docker
   104      $ sudo chown root:docker /var/run/docker.sock
   105      $ sudo usermod -a -G docker $USERNAME
   106  
   107  ## Custom daemon options
   108  
   109  If you need to add an HTTP Proxy, set a different directory or partition for the
   110  Docker runtime files, or make other customizations, read our Systemd article to
   111  learn how to [customize your Systemd Docker daemon options](/articles/systemd/).
   112  
   113  ## What next?
   114  
   115  Continue with the [User Guide](/userguide/).
   116