Intalling docker-ce on fedora 26

1.Add docker-ce repo in fedora 26

[12:54 root@server /home/cipher]# sudo dnf config-manager \
> --add-repo \
> https://download.docker.com/linux/fedora/docker-ce.repo
Adding repo from: https://download.docker.com/linux/fedora/docker-ce.repo
[12:55 root@server /home/cipher]#

2.Install docker-ce

[12:55 root@server /home/cipher]# dnf install docker-ce

3.Start , enable docker service

[12:58 root@server /home/cipher]# systemctl start docker
[12:58 root@server /home/cipher]# systemctl enable docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
[12:58 root@server /home/cipher]#

4.Fixing docker access error as a normal user

[12:59 cipher ~]$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get https://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/json: dial unix /var/run/docker.sock: connect: permission denied

add user to docker group
[12:59 cipher ~]$ sudo usermod -aG docker cipher
[sudo] password for cipher:

To reflect the changes without logging out the system or reboot use below command

[12:59 cipher ~]$ newgrp docker

Try accessing docker as a normal user
[12:59 cipher ~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

5.Pulling docker image.

[12:59 cipher ~]$ docker pull centos
Using default tag: latest
latest: Pulling from library/centos
af4b0a2388c6: Pull complete
Digest: sha256:2671f7a3eea36ce43609e9fe7435ade83094291055f1c96d9d1d1d7c0b986a5d
Status: Downloaded newer image for centos:latest

6.Installing docker compose

sudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose