Last Updated: February 25, 2016
·
791
· bt3gl

Getting Started with Docker in Fedora 20

Installing and Running

$ sudo yum -y install docker-io

Start the Docker Daemon

$ sudo systemctl start docker

Start at Boot

$ sudo systemctl enable docker

Verify that Docker is Working

$ sudo docker run -i -t fedora /bin/bash

The docker command line tool contacts the docker daemon process via a socket file /var/run/docker.sock owned by group docker.

One must be member of that group in order to contact the docker -d process:

$ usermod -a -G docker login_name

Hello World

$ sudo docker run fedora/bin/echo 'Hello world'

Containers

To list containers:

$ docker ps

Shows us the standard output of a container:

$ docker logs

Stops running containers:

$ docker stop