Installing Docker on Fedora 23

So, for some reason every time I have to install Docker on Fedora I get a couple of bumps along the way. So, I wanted to leave a brief tip on how to get it installed without permission issues and without having to log out of the system. Here we go:

First, rather obvious, you have to install the package:

sudo dnf -y install docker-io

Next, lets add a docker group so you don’t have to run sudo every time you use the docker cli:

sudo groupadd docker

Now, add your user to the docker group:

sudo usermod -aG docker $USER

Here is a little trick so you don’t have to login and out… I’m assuming you use your default group as primary group, that is the name of your primary group is the name of your user. If you are not sure run groups $USER to verify.

newgrp docker
newgrp $USER # or whatever your primary group is

Now, finish up the installation by enabling (if you want docker to start automatically during boot) and starting the docker daemon:

sudo systemctl enable docker
sudo systemctl start docker

Finally, verify your installation:

docker run hello-world

Now, the group thing was kinda hacky, so make sure you log out and back in, eventually.

Meanwhile keep hacking!