Install docker-buildx for Ubuntu
Since docker 23, the legacy builder is deprecated. It is needed
to install the package "docker-buildx".
Output example:
root@u22ovn:/tmp# docker build -t frr frr_docket
DEPRECATED: The legacy builder is deprecated and will be removed in a
future release. Install the buildx component to build
images with BuildKit:
https://docs.docker.com/go/buildx/
This package is not present in CentOS nor Fedora.
Related-Bug: #2088166
Change-Id: I8024fc8c0b73c52044826c9850d20ecc6fbb2fb6
diff --git a/roles/docker-setup/tasks/main.yml b/roles/docker-setup/tasks/main.yml
index 19d8bfb..1b0e2d7 100644
--- a/roles/docker-setup/tasks/main.yml
+++ b/roles/docker-setup/tasks/main.yml
@@ -4,6 +4,14 @@
name: docker.io
state: present
+- name: Install docker-buildx (only for Ubuntu and Debian)
+ become: yes
+ package:
+ name: docker-buildx
+ state: present
+ when:
+ - (ansible_facts['distribution'] | lower) in ['ubuntu', 'debian']
+
- name: Copy 52_docker_for_tempest to /etc/sudoers.d
copy:
src: 52_docker_for_tempest