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