[incidental_setup_docker] changes to upstream repo (#71897)

Change:
- The docker-ce.repo file for centos does not work on RHEL since it uses
  $releasever and on RHEL that is, e.g., "7Server".
- Instead, set up the repo manually.
- Additionally, the docker centos8 repo no longer has old versions, so
  we use the (only) version in the repo instead.

Test Plan:
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
Rick Elrod 2020-09-23 18:31:18 -05:00 committed by GitHub
parent 98d10cd6ee
commit 31ddca4c0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 10 deletions

View file

@ -17,10 +17,14 @@
args: args:
warn: no warn: no
- name: Add repository # They broke their .repo file, so we set it up ourselves
command: yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - name: Set-up repository
args: yum_repository:
warn: no name: docker-ce
description: docker-ce
baseurl: https://download.docker.com/linux/centos/{{ ansible_facts.distribution_major_version }}/$basearch/stable
gpgcheck: true
gpgkey: https://download.docker.com/linux/centos/gpg
- name: Update cache - name: Update cache
command: yum -y makecache fast command: yum -y makecache fast

View file

@ -11,10 +11,14 @@
retries: 10 retries: 10
delay: 2 delay: 2
# They broke their .repo file, so we set it up ourselves
- name: Set-up repository - name: Set-up repository
command: dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum_repository:
args: name: docker-ce
warn: no description: docker-ce
baseurl: https://download.docker.com/linux/centos/{{ ansible_facts.distribution_major_version }}/$basearch/stable
gpgcheck: true
gpgkey: https://download.docker.com/linux/centos/gpg
- name: Install docker - name: Install docker
dnf: dnf:

View file

@ -4,7 +4,6 @@ docker_prereq_packages:
- lvm2 - lvm2
- libseccomp - libseccomp
# Docker CE > 3:18.09.1 requires containerd.io >= 1.2.2-3 which is unavaible at this time
docker_packages: docker_packages:
- docker-ce-3:18.09.1 - docker-ce-19.03.13
- docker-ce-cli-1:18.09.1 - docker-ce-cli-19.03.13