Welcome to our guide on how to install Docker on Fedora 29 / Fedora 28. The release of Docker we’ll install is Docker Community Edition (CE). Docker is a leading container runtime engine that allows you to package your applications with all of its dependencies into a standardized unit for software development.
Follow the steps below to have the latest release of Docker installed on your Fedora 29.
Step 1: Update your system
We always start our installations by updating and upgrading OS packages. On Fedora, this can be easily done by running the command:
sudo dnf -y update
It is recommended to reboot your system after an upgrade
Step 2: Add the Docker repository to Fedora 29/28
After upgrading system packages and rebooting the server, proceed to add Fedora repository to your system
sudo dnf -y install dnf-plugins-core
Add the repository:
cat >/etc/yum.repos.d/docker-ce.repo<<EOF [docker-ce-stable] name=Docker CE Stable baseurl=https://download.docker.com/linux/fedora/28/x86_64/stable enabled=1 gpgcheck=1 gpgkey=https://download.docker.com/linux/fedora/gpg EOF
This command will set up the stable Docker repository.
Step 3: Install the latest Docker Engine on Fedora 29 / 28
Now that you have your repository ready, install the latest stable release of Docker on your machine by running:
sudo dnf -y install docker-ce
Docker will be installed but not started. To start the docker service, run:
sudo systemctl start docker
Enable it to start on boot:
sudo systemctl enable docker
docker group is created, but no users are added to the group. Add your user to this group to run docker commands without sudo.
sudo usermod -aG docker $(whoami)
You can verify the version of Docker installed by running:
$ docker version Client: Version: 18.06.1-ce API version: 1.38 Go version: go1.10.3 Git commit: e68fc7a Built: Tue Aug 21 17:25:02 2018 OS/Arch: linux/amd64 Experimental: false Server: Engine: Version: 18.06.1-ce API version: 1.38 (minimum version 1.12) Go version: go1.10.3 Git commit: e68fc7a Built: Tue Aug 21 17:26:30 2018 OS/Arch: linux/amd64 Experimental: false
Step 4: Pull Test docker image
The last step is to test your installation by downloading a test docker container.
$ docker pull alpine Using default tag: latest latest: Pulling from library/alpine 4fe2ade4980c: Pull complete Digest: sha256:621c2f39f8133acb8e64023a94dbdf0d5ca81896102b9e57c0dc184cadaf5528 Status: Downloaded newer image for alpine:latest
Verify that Docker CE is installed correctly by running the alpine image.
$ docker run -it --rm alpine /bin/sh / # apk update fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz v3.8.1-58-gb11ab10a64 [http://dl-cdn.alpinelinux.org/alpine/v3.8/main] v3.8.1-42-ge6bc061baf [http://dl-cdn.alpinelinux.org/alpine/v3.8/community] OK: 9546 distinct packages available / # exit
That’s all. You now have Docker running on your Fedora 29 / Fedora 28. Please check our guide on managing Docker containers through a web interface:
For installation of Docker on other systems, use:
Don’t forget to check other Fedora articles available on our website.