From c7a91055f3c360b4fa957835440c2857066726b8 Mon Sep 17 00:00:00 2001 From: Petr Ankudinov Date: Mon, 8 Jan 2024 17:36:50 +0100 Subject: [PATCH] Fix: Minor container fixes (#3474) --- containers/base/.devcontainer/Dockerfile | 2 ++ containers/dev/.devcontainer/Dockerfile | 2 ++ containers/universal/.devcontainer/Dockerfile | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/containers/base/.devcontainer/Dockerfile b/containers/base/.devcontainer/Dockerfile index c47a79b6688..c33e1011d4c 100644 --- a/containers/base/.devcontainer/Dockerfile +++ b/containers/base/.devcontainer/Dockerfile @@ -7,6 +7,8 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ make \ git \ + # xz-utils required for docker import to work + xz-utils \ && rm -rf /var/lib/apt/lists/* \ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \ && apt-get clean diff --git a/containers/dev/.devcontainer/Dockerfile b/containers/dev/.devcontainer/Dockerfile index b610559d866..7fe27420627 100644 --- a/containers/dev/.devcontainer/Dockerfile +++ b/containers/dev/.devcontainer/Dockerfile @@ -14,3 +14,5 @@ ENTRYPOINT [ "/bin/entrypoint.sh" ] # Switch user to given USERNAME otherwise Ansible will be installed as root. USER ${USERNAME} ENV PATH=$PATH:/home/${USERNAME}/.local/bin +# make sure that path required to mount Ansible collection exists +RUN mkdir -p /home/${USERNAME}/.ansible/collections/ansible_collections/arista/avd diff --git a/containers/universal/.devcontainer/Dockerfile b/containers/universal/.devcontainer/Dockerfile index d019be0f2c7..1ede90bc49e 100644 --- a/containers/universal/.devcontainer/Dockerfile +++ b/containers/universal/.devcontainer/Dockerfile @@ -13,4 +13,6 @@ ENV PATH=$PATH:/home/${USERNAME}/.local/bin # Install Ansible AVD collection. RUN pip3 install "${ANSIBLE_CORE_VERSION}" \ && ansible-galaxy collection install ${ANSIBLE_INSTALL_LOCATION} \ - && pip3 install -r /home/${USERNAME}/.ansible/collections/ansible_collections/arista/avd/requirements.txt + && pip3 install -r /home/${USERNAME}/.ansible/collections/ansible_collections/arista/avd/requirements.txt \ + # install community.general to support callback plugins in ansible.cfg, etc. + && ansible-galaxy collection install community.general