Install docker-engine
Just add a [dockerrepo]
configuration to the /etc/yum.repos.d/docker.repo
repository, and sudo yum install docker-engine
.
Start the docker daemon with sudo systemctl start docker
, then following sudo docker run --rm hello-world
a printout like the following is a very good sign:
Hello from Docker!
This message shows that your installation appears to be working correctly.
Avoid using sudo
all the time by creating a docker
group and adding users to it: sudo usermod -aG docker $(whoami)
To enable the daemon to run at bootup: sudo systemctl enable docker
$ vagrant up
$ vagrant ssh
[vagrant@localhost ~]$ sudo yum install -y yum-utils
[vagrant@localhost ~]$ sudo yum-config-manager \
> --add-repo \
> https://download.docker.com/linux/centos/docker-ce.repo
[vagrant@localhost ~]$ sudo yum install docker-ce
[vagrant@localhost ~]$ sudo systemctl enable docker
[vagrant@localhost ~]$ sudo usermod -aG docker $(whoami)
[vagrant@localhost ~]$ sudo systemctl start docker
[vagrant@localhost ~]$ sudo docker run --rm hello-world
[vagrant@localhost ~]$ sudo yum install epel-release -y; sudo yum install -y python-pip
[vagrant@localhost ~]$ sudo pip install docker-compose
[vagrant@localhost ~]$ sudo yum upgrade python*
[vagrant@localhost ~]$ sudo curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
[vagrant@localhost ~]$ reboot
Password: vagrant
$ vagrant snapshot save DOCKERINSTALLED