diff --git a/base-images/Dockerfile.debian-bookworm-av b/base-images/Dockerfile.debian-bookworm-av index df50af1c..a7a83ef1 100644 --- a/base-images/Dockerfile.debian-bookworm-av +++ b/base-images/Dockerfile.debian-bookworm-av @@ -36,4 +36,11 @@ RUN \ /root/.cache \ /var/lib/apt/lists/* \ /var/tmp/* \ - /tmp/* + /tmp/* && \ + echo "**** wrap dpkg for user installs ****" && \ + mv \ + /usr/bin/dpkg \ + /usr/bin/dpkg-real + +# add local files +COPY /debian-root / diff --git a/base-images/Dockerfile.debian-bookworm-core b/base-images/Dockerfile.debian-bookworm-core index 263e2852..b5efaf6e 100644 --- a/base-images/Dockerfile.debian-bookworm-core +++ b/base-images/Dockerfile.debian-bookworm-core @@ -31,4 +31,11 @@ RUN \ /root/.cache \ /var/lib/apt/lists/* \ /var/tmp/* \ - /tmp/* + /tmp/* && \ + echo "**** wrap dpkg for user installs ****" && \ + mv \ + /usr/bin/dpkg \ + /usr/bin/dpkg-real + +# add local files +COPY /debian-root / diff --git a/base-images/Dockerfile.debian-sid-av b/base-images/Dockerfile.debian-sid-av index b903710d..85dd1e3c 100644 --- a/base-images/Dockerfile.debian-sid-av +++ b/base-images/Dockerfile.debian-sid-av @@ -36,4 +36,11 @@ RUN \ /root/.cache \ /var/lib/apt/lists/* \ /var/tmp/* \ - /tmp/* + /tmp/* && \ + echo "**** wrap dpkg for user installs ****" && \ + mv \ + /usr/bin/dpkg \ + /usr/bin/dpkg-real + +# add local files +COPY /debian-root / diff --git a/base-images/debian-root/usr/bin/dpkg b/base-images/debian-root/usr/bin/dpkg new file mode 100755 index 00000000..8c0458aa --- /dev/null +++ b/base-images/debian-root/usr/bin/dpkg @@ -0,0 +1,6 @@ +#!/bin/bash +if [ "$EUID" -ne 0 ]; then + /usr/bin/dpkg-real --force-not-root "$@" +else + /usr/bin/dpkg-real "$@" +fi