Home Docker Installing Docker on Fedora

Installing Docker on Fedora

by admin

I wrote an article a little while ago on installing Docker on Ubuntu. I’ve been meaning to get back to learning more about Docker for a little while now – can’t believe it’s almost a year since I wrote that first article! With that in mind I wanted to go over the installation process again, but this time using Fedora, as I have been using it a lot recently.

Installing Docker on Fedora using Yum

I’ll be using an existing instance of Fedora I have running as a virtual machine. I’d recommend before doing anything else that existing packages are updated:

 # yum update -y

When running the command you should see a list of packages, for example:

---> Package fontconfig.x86_64 0:2.11.0-1.fc20 will be updated
---> Package fontconfig.x86_64 0:2.11.0-2.fc20 will be an update
---> Package fpaste.noarch 0:0.3.7.1-9.fc20 will be updated
---> Package fpaste.noarch 0:0.3.7.3.3-1.fc20 will be an update
---> Package freetype.x86_64 0:2.5.0-4.fc20 will be updated
...

Then the updates will be downloaded and installed – this may take some time depending on when the packages were last updated. Once complete we can install Docker using the docker-io package:

[root@localhost ~]# yum -y install docker-io
Loaded plugins: langpacks, refresh-packagekit
updates/20/x86_64/metalink                                                                                                                                         | 2.6 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package docker-io.x86_64 0:1.5.0-1.fc20 will be installed
--> Finished Dependency Resolution

Dependencies Resolved
...
Install  1 Package

Total download size: 5.8 M
Installed size: 26 M
Downloading packages:
docker-io-1.5.0-1.fc20.x86_64.rpm                                                                                                                                  | 5.8 MB  00:00:12
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  Installing : docker-io-1.5.0-1.fc20.x86_64                                                                                                                                          1/1
  Verifying  : docker-io-1.5.0-1.fc20.x86_64                                                                                                                                          1/1

Installed:
  docker-io.x86_64 0:1.5.0-1.fc20

Complete!
[root@localhost ~]#

As you can see, the Docker package isn’t a large download, at just under 6MB. The installation will only take a few moments. Once done, we can start the Docker daemon using systemctl:

# systemctl start docker

You can confirm Docker is running by checking the status, again using systemctl:

[root@localhost ~]# systemctl status docker
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled)
   Active: active (running) since Wed 2015-11-18 08:53:24 GMT; 1min 24s ago
     Docs: https://docs.docker.com
 Main PID: 30300 (docker)

To have Docker automatically start when the server starts run:

 [root@localhost ~]# systemctl enable docker
ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service'

That’s about it for the install. We can check the installed Docker version with:

[root@localhost ~]# docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.3.3
Git commit (client): a8a31ef/1.5.0
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.3.3
Git commit (server): a8a31ef/1.5.0

Look out for some more articles soon on running Docker on Fedora – starting with downloading a Fedora Docker image, then running a Fedora Docker container.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More