Anupam K
Anupam K

Reputation: 309

Install docker on RedHatLinux 6.7

I am following the documentation https://docs.docker.com/engine/installation/rhel/ to install docker on RHEL 6.7. When I run the command

sudo yum install docker-engine

I get the following error

Error: Package: docker-engine-1.9.1-1.el7.centos.x86_64 (dockerrepo)
           Requires: libsystemd-journal.so.0(LIBSYSTEMD_JOURNAL_196)(64bit)
Error: Package: docker-engine-1.9.1-1.el7.centos.x86_64 (dockerrepo)
           Requires: libsystemd-journal.so.0(LIBSYSTEMD_JOURNAL_195)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

As per the suggestion I tried to run the command

sudo yum install docker-engine --skip-broken

Here is the output

    Packages skipped because of dependency problems:
    audit-libs-python-2.3.7-5.el6.x86_64 from RHEL-67-x86_64
    docker-engine-1.9.1-1.el7.centos.x86_64 from dockerrepo
    docker-engine-selinux-1.9.1-1.el7.centos.noarch from dockerrepo
    libsemanage-python-2.0.43-5.1.el6.x86_64 from RHEL-67-x86_64
    policycoreutils-python-2.0.83-24.el6.x86_64 from RHEL-67-x86_64
    setools-libs-3.3.7-4.el6.x86_64 from RHEL-67-x86_64
    setools-libs-python-3.3.7-4.el6.x86_64 from RHEL-67-x86_64

How can I fix above problems and install docker on RHEL 6.7 ?

Upvotes: 3

Views: 26203

Answers (4)

Saiprasad Bane
Saiprasad Bane

Reputation: 487

Below steps do work for Docker to be installed on OEL 6.10 with a user having super user privileges.

  1. Create a user with SUDO Access as suggested in Red-Hat Docs ([Link][1] speaks well on this process). For instance I created an user as docker with group as docker.

    groupadd docker  
    useradd -m -g docker docker
    
  2. Add docker repository for installing latest copy of Docker for RHEL/Centos 6

    yum update -y  
    yum install epel-release  
    vi /etc/yum.repos.d/docker.repo   
    
  3. Add below contents to /etc/yum.repos.d/docker.repo

    [docker-repo]  
    name=Docker Repo  
    baseurl=https://yum.dockerproject.org/repo/main/centos/6/  
    enabled=1  
    gpgcheck=1  
    gpgkey=https://yum.dockerproject.org/gpg  
    
  4. Switch to "docker" user and execute below commands:

    sudo yum install -y docker-engine

  5. Post Installation start docker using below commands.

    sudo chkconfig docker on  
    
    sudo service docker start  
    Starting cgconfig service:                                 [  OK  ]  
    Starting docker:                                           [  OK  ]  
    
    sudo service docker status  
    docker (pid  26925) is running...  
    
    ps -ef | grep docker  
    root     25590 14123  0 Jul27 ?        00:00:00 sshd: docker [priv]  
    docker   25594 25590  0 Jul27 ?        00:00:00 sshd: docker@pts/1  
    docker   25595 25594  0 Jul27 pts/1    00:00:00 -bash  
    root     26925     1  2 00:00 pts/1    00:00:00 /usr/bin/docker -d  
    docker   27106 25595  0 00:00 pts/1    00:00:00 ps -ef  
    docker   27107 25595  0 00:00 pts/1    00:00:00 grep docker  
    
    docker ps -a  
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES  
    

    [1]: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch02s03.html

Upvotes: 3

Gaalvarez
Gaalvarez

Reputation: 163

For me was useful this link. I have an oracle server 6.10 and the steps are:

  • add epel packages: rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
  • update packages: yum update -y
  • Install docker: yum install docker-io -y
  • Start service: /etc/init.d/docker start
  • Configure service in start machine: chkconfig docker on

Upvotes: 1

VPusher
VPusher

Reputation: 376

You can install the last version of Docker by upgrading your Kernel to 3.10. At your own risk :)

Worked for me and pretty stable for weeks now.

Upgrading RHEL Kernel

Upvotes: 1

Michael
Michael

Reputation: 8683

RHEL 6 is no longer supported by Docker, the latest version you can install is Docker 1.7. The installation instructions can be found here

Upvotes: 6

Related Questions