diff --git a/pipeline.Dockerfile b/pipeline.Dockerfile index b025fd100..d4c46761a 100644 --- a/pipeline.Dockerfile +++ b/pipeline.Dockerfile @@ -27,14 +27,14 @@ RUN apt update -q \ ca-certificates \ curl \ gnupg2 \ - software-properties-common \ unzip \ libvirt-clients \ qemu-utils \ qemu-kvm \ dnsmasq \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | tee /etc/apt/sources.list.d/docker.list \ && apt update -q \ && apt install --no-install-recommends -yq docker-ce \ && apt autoremove -yqq --purge && apt clean && rm -rf /var/lib/apt/lists/* /var/log/* diff --git a/scripts/pipeline.Dockerfile.j2 b/scripts/pipeline.Dockerfile.j2 index 0af1f92c6..e7ed7bd54 100644 --- a/scripts/pipeline.Dockerfile.j2 +++ b/scripts/pipeline.Dockerfile.j2 @@ -27,14 +27,14 @@ RUN apt update -q \ ca-certificates \ curl \ gnupg2 \ - software-properties-common \ unzip \ libvirt-clients \ qemu-utils \ qemu-kvm \ dnsmasq \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ + && curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | tee /etc/apt/sources.list.d/docker.list \ && apt update -q \ && apt install --no-install-recommends -yq docker-ce \ && apt autoremove -yqq --purge && apt clean && rm -rf /var/lib/apt/lists/* /var/log/*