Pin pip to 20.3.3 and disable tmpfs in DIB
[ta/build-tools.git] / docker-context / Dockerfile-dib
index fa1359f..269901a 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM centos:7.5.1804
+
+# Use newer than the CentOS stock diskimage-builder via "cloud" repo
+FROM centos:7.6.1810
 RUN \
-    yum-config-manager --add-repo http://mirror.centos.org/centos/7/cloud/x86_64/openstack-pike/ && \
-    yum-config-manager --add-repo https://trunk.rdoproject.org/centos7-pike/57/c7/57c7be250c919c04b51361d4d42e95818cfec5a5_15fc9723 && \
-    yum install --nogpgcheck -y diskimage-builder \
+    if [ "$(uname -m)" = aarch64 ]; then \
+        REPO_URI=http://mirror.centos.org/altarch/7/cloud/aarch64/openstack-queens/; \
+        EXTRA_RPM="gdisk dosfstools util-linux"; \
+    else \
+        REPO_URI=http://mirror.centos.org/centos/7/cloud/x86_64/openstack-queens/; \
+    fi && \
+    yum-config-manager --add-repo $REPO_URI && \
+    yum install --nogpgcheck -y \
         git \
         python \
+        python-pip \
         wget \
         which \
         findutils \
         systemd-udev \
-        PyYAML \
         parted \
         sudo \
         e2fsprogs \
-        xfsprogs
+        xfsprogs \
+        qemu-img \
+        ${EXTRA_RPM:-} && \
+    pip install --upgrade pip==20.3.3 && \
+    pip install diskimage-builder==2.26.1 && \
+    pip install zipp && \
+    true && \
+    yum remove -y python-pip
+RUN find -name 99-selinux-fixfiles-restore -exec rm {} \;
 
 WORKDIR /work