Fedora 26: Install docker-engine for container

This article will describe installing docker-engine. Please see here for usage of Docker.

1 Install docker-engine

The following script will install docker-engine.


set -e

# Install docker-engine.
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo ${PASS}
sudo mkdir -p /var/lib/docker # docker-engine-selinux issue
sudo dnf install -y docker-engine
sudo systemctl start docker
sudo systemctl enable docker

# Add docker group for running docker without sudo.
sudo groupadd docker
sudo gpasswd -a "${USER}" docker
sudo reboot

2 Execution result

Run hello-world.

$ docker run hello-world
Hello from Docker!