From 87cb6bc551ca25f4a5bdaca1825fcf53f57125b2 Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Wed, 16 Mar 2022 15:35:18 +0100 Subject: [PATCH] add podman and docker binaries In #22 and #23 the podman and docker molecule drivers were added, but the respective binaries are still missing. This commit adds the necesarry dependencies to the execution enviroments bindep.txt. This commit also adds some CLI commands to check we do not remove them inadvertently and output some helpful version information at build time. There is also a workaround to make installing podman and docker simultaneously possible. This is due to a conflict between the packaged version of runc in the containerd.io package from Docker and the CentOS 8 Stream native version packaged for Podman and Skopeo. This can be changed once https://github.com/docker/containerd-packaging/pull/231 is merged and available upstream via the Docker repository. Cudos for the workaround: https://faun.pub/how-to-install-simultaneously-docker-and-podman-on-rhel-8-centos-8-cb67412f321e Signed-off-by: Daniel Ziegenberg --- Containerfile | 10 ++++++++++ _build/bindep.txt | 1 + execution-environment.yml | 13 +++++++++++++ 3 files changed, 24 insertions(+) diff --git a/Containerfile b/Containerfile index c529db2..f1210fb 100644 --- a/Containerfile +++ b/Containerfile @@ -28,3 +28,13 @@ COPY --from=galaxy /usr/share/ansible /usr/share/ansible COPY --from=builder /output/ /output/ RUN /output/install-from-bindep && rm -rf /output/wheels RUN alternatives --set python /usr/bin/python3 +RUN dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo +RUN dnf config-manager --set-disabled docker-ce-stable +RUN rpm --install --nodeps --replacefiles --excludepath=/usr/bin/runc https://download.docker.com/linux/centos/8/x86_64/stable/Packages/containerd.io-1.5.10-3.1.el8.x86_64.rpm +RUN dnf --assumeyes --enablerepo=docker-ce-stable install docker-ce +RUN molecule --version +RUN molecule drivers +RUN ansible-lint --version +RUN docker --version +RUN podman --version +RUN git --version diff --git a/_build/bindep.txt b/_build/bindep.txt index ee01b34..66211f3 100644 --- a/_build/bindep.txt +++ b/_build/bindep.txt @@ -1 +1,2 @@ python38-devel [platform:rpm compile] +podman [platform:rpm] diff --git a/execution-environment.yml b/execution-environment.yml index f00d65a..48491e2 100644 --- a/execution-environment.yml +++ b/execution-environment.yml @@ -8,3 +8,16 @@ dependencies: additional_build_steps: append: - RUN alternatives --set python /usr/bin/python3 + - RUN dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo + - RUN dnf config-manager --set-disabled docker-ce-stable + # This is a workaround due to a conflict between the packaged version of runc in the containerd.io package from Docker and the CentOS 8 Stream native + # version packaged for Podman and Skopeo. This can be changed once https://github.com/docker/containerd-packaging/pull/231 is merged and available + # upstream via the Docker repository. Cudos for the workaround: https://faun.pub/how-to-install-simultaneously-docker-and-podman-on-rhel-8-centos-8-cb67412f321e + - RUN rpm --install --nodeps --replacefiles --excludepath=/usr/bin/runc https://download.docker.com/linux/centos/8/x86_64/stable/Packages/containerd.io-1.5.10-3.1.el8.x86_64.rpm + - RUN dnf --assumeyes --enablerepo=docker-ce-stable install docker-ce + - RUN molecule --version + - RUN molecule drivers + - RUN ansible-lint --version + - RUN docker --version + - RUN podman --version + - RUN git --version