Skip to content

Commit

Permalink
#13 allow apt installs in userspace
Browse files Browse the repository at this point in the history
  • Loading branch information
thelamer committed Apr 15, 2024
1 parent dbac587 commit 6d4f617
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
9 changes: 8 additions & 1 deletion base-images/Dockerfile.debian-bookworm-av
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
9 changes: 8 additions & 1 deletion base-images/Dockerfile.debian-bookworm-core
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
9 changes: 8 additions & 1 deletion base-images/Dockerfile.debian-sid-av
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
6 changes: 6 additions & 0 deletions base-images/debian-root/usr/bin/dpkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
/usr/bin/dpkg-real --force-not-root "$@"
else
/usr/bin/dpkg-real "$@"
fi

0 comments on commit 6d4f617

Please sign in to comment.