Menu

Dipesh Majumdar

Blog and Paintings

Install Docker CE on RHEL

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

sudo yum-config-manager --add-repo  https://download.docker.com/linux/centos/docker-ce.repo
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo

sudo yum-config-manager --enable docker-ce-edge
sudo yum-config-manager --enable docker-ce-test

You can disable the edge or test repository by running the yum-config-manager command with the --disable flag. To re-enable it, use the --enable flag. The following command disables the edge repository.

sudo yum-config-manager --disable docker-ce-edge
Note: Starting with Docker 17.06, stable releases are also pushed to the edge and test repositories.

sudo yum install docker-ce

install docker compose ->
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

[root@local ~]# docker-compose --version
docker-compose version 1.21.2, build a133471
[root@local ~]#

**************beware of this error***************

Cannot connect to the Docker daemon at unix:///var/run/docker.sock

even after installing docker the above error might trouble you - so start the docker service to solve that - 

[dipesh.majumdar@some-instance ~]$ sudo service docker start
Redirecting to /bin/systemctl start docker.service
[dipesh.majumdar@some-instance ~]$ sudo service docker status
Redirecting to /bin/systemctl status docker.service
‚óŹ docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)

docker process should be visible

ps -ef |grep docker
root     20724     1  0 23:04 ?        00:00:00 /usr/bin/dockerd
root     20730 20724  0 23:04 ?        00:00:00 docker-containerd --config /var/run/docker/containerd/containerd.toml
dipesh.+ 21186 20549  0 23:09 pts/1    00:00:00 grep --color=auto docker

..................................................

.....................................

Go Back

Comment