how to install docker-ce 17+ on centos 6.9?

Im currently trying to install docker-ce 17+ on a centOS 6.9 server, however, when running yum install docker-ce i get the following errors:

Error: Package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
          Requires: libc.so.6(GLIBC_2.17)(64bit)
Error: Package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
          Requires: systemd-units
Error: Package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
          Requires: libseccomp.so.2()(64bit)
Error: Package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
          Requires: libsystemd.so.0()(64bit)
Error: Package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
          Requires: container-selinux >= 2.9
Error: Package: docker-ce-17.06.1.ce-1.el7.centos.x86_64 (docker-ce-stable)
          Requires: libsystemd.so.0(LIBSYSTEMD_209)(64bit)

If i run it with the skip broken flag i get still the same message,

Does anyone know a way around this?


Solution 1:

You need to peg the version:

$ yum install --setopt=obsoletes=0 \
   docker-ce-17.03.2.ce-1.el7.centos.x86_64 \
   docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch # on a new system with yum repo defined, forcing older version and ignoring obsoletes introduced by 17.06.0

More details here: https://github.com/docker/for-linux/issues/20