Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Centos8] Installation of docker fails #171

Closed
papanito opened this issue Nov 10, 2019 · 6 comments
Closed

[Centos8] Installation of docker fails #171

papanito opened this issue Nov 10, 2019 · 6 comments

Comments

@papanito
Copy link

Installation of docker-ce fails with on CentOS 8

fatal: [node002]: FAILED! => {"changed": false, "failures": [], "msg": "Depsolve Error occured: \n Problem: package docker-ce-3:19.03.4-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed\n  - cannot install the best candidate for the job\n  - package containerd.io-1.2.10-3.2.el7.x86_64 is excluded\n  - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded\n  - package containerd.io-1.2.2-3.el7.x86_64 is excluded\n  - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded\n  - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded\n  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded", "rc": 1, "results": []}
---
- name: Setup docker
  hosts: all

  vars:
    pip_install_packages:
      - name: docker

  roles:
    - geerlingguy.docker
ansible 2.9.0
  config file = /home/aedu/ansible.cfg
  configured module search path = ['/home/aedu/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.4 (default, Oct  4 2019, 06:57:26) [GCC 9.2.0]
# uname -a
Linux node002 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
@papanito
Copy link
Author

papanito commented Nov 10, 2019

I understand this is a CentOS issue and manually you can install the package with dnf install --nobest docker-ce. Can this be achieved with this role?

@hoxu
Copy link

hoxu commented Nov 22, 2019

@papanito did you find any workaround for this?

@hoxu
Copy link

hoxu commented Nov 22, 2019

The issue is that docker-ce has not been packaged for CentOS 8 yet.

An ugly workaround is to install containerd.io manually beforehand:

pre_tasks:
  - yum:
     name: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

geerlingguy added a commit that referenced this issue Dec 11, 2019
@geerlingguy
Copy link
Owner

A little more detail (for google-ability); the actual error you get if you try this role on CentOS 8 is:

TASK [geerlingguy.docker : Install Docker.] ************************************
524    fatal: [instance]: FAILED! => {"changed": false, "failures": [], "msg": "Depsolve Error occured: 
 Problem: package docker-ce-3:19.03.5-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package containerd.io-1.2.10-3.2.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.el7.x86_64 is excluded
  - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded", "rc": 1, "results": []}

@geerlingguy
Copy link
Owner

I just pushed up a commit that makes this work on CentOS 8 / RHEL 8 using the workaround @hoxu found. Hopefully this won't be needed at some point in the future!

@GuangweiWen
Copy link

Thank you, workaround provided by @hoxu works on my CentOS 8

louloudakis pushed a commit to louloudakis/ansible-role-docker that referenced this issue Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants