From 1bd42857f68a3fb86a0011235a928238af8d1035 Mon Sep 17 00:00:00 2001 From: Vinayak Goyal Date: Fri, 12 Feb 2021 18:58:00 -0800 Subject: [PATCH] Fix s390x build failures. --- images/build/setcap/Dockerfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/images/build/setcap/Dockerfile b/images/build/setcap/Dockerfile index 2325865a4d9..3fdb174690d 100644 --- a/images/build/setcap/Dockerfile +++ b/images/build/setcap/Dockerfile @@ -16,4 +16,15 @@ ARG BASEIMAGE FROM ${BASEIMAGE} -RUN apt-get update && apt-get -y --no-install-recommends install libcap2-bin +# An attempt to fix issues like: +# ``` +# Error while loading /usr/sbin/dpkg-split: No such file or directory +# Error while loading /usr/sbin/dpkg-deb: No such file or directory +# ``` +# See: https://github.com/docker/buildx/issues/495 +RUN ln -s /usr/bin/dpkg-split /usr/sbin/dpkg-split \ + && ln -s /usr/bin/dpkg-deb /usr/sbin/dpkg-deb \ + && ln -s /bin/tar /usr/sbin/tar \ + && ln -s /bin/rm /usr/sbin/rm \ + && apt-get update \ + && apt-get -y --no-install-recommends install libcap2-bin