Fixed the Dockerfile to download Ubuntu 20.04 packages

For the SPT and FIO tests we download the offline
deb packages for Ubuntu 20.04 cloud images and put
them to /opt/packages.

However the OS aptelope heat product image is based
on Ubuntu 22.04. So the packages for the 22.04 release
are downloaded instead of 20.04 which is used for FIO
and Iperf tests.

Thus, we download 20.04 deb packages firstly and then
build the image.

Related-PROD: PROD-37187
Change-Id: Iee4870a1b8d477d6cb17d8512456ceab12a8b112
diff --git a/k8s/docker-mos-toolset-min b/k8s/docker-mos-toolset-min
index 28a9f9a..cccc583 100644
--- a/k8s/docker-mos-toolset-min
+++ b/k8s/docker-mos-toolset-min
@@ -1,9 +1,18 @@
+FROM ubuntu:20.04 AS download-packages
+RUN mkdir /opt/packages && cd /opt/packages && \
+    apt-get update && \
+    apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 iperf fio | grep "^\w" | sort -u) || true && \
+    rm -rf /var/lib/apt/lists/*
+
 FROM mirantis.azurecr.io/openstack/heat:antelope-jammy-20231204144213
 
 LABEL maintainer="qa-ps@mirantis.com"
 
 ADD ./src/mos-spt.tgz /opt/mos-spt/
 WORKDIR /opt
+
+COPY --from=download-packages /opt/packages /opt/packages
+
 RUN export TZ="America/Chicago" && \
     ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
     apt-get update && \
@@ -13,10 +22,6 @@
 
 RUN pip3 install --no-cache-dir tempestparser
 
-RUN mkdir /opt/packages/ && \
-    cd /opt/packages && \
-    apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 iperf fio | grep "^\w" | sort -u) || true
-
 RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
     install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \
     rm kubectl