[librsvg-oci-images/add-curl-to-debian: 2/2] Build debian images with user namespaces




commit 0fe0e2882308883473c4e9b122c35991b76f9f67
Author: Sven Neumann <sven svenfoo org>
Date:   Fri Oct 23 17:40:51 2020 +0200

    Build debian images with user namespaces

 debian/cleanup.sh | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/debian/cleanup.sh b/debian/cleanup.sh
index 808ce07..89843b7 100644
--- a/debian/cleanup.sh
+++ b/debian/cleanup.sh
@@ -6,4 +6,18 @@ echo "Removing apt cache"
 apt clean
 rm -rf /var/lib/apt/lists
 
-rm -R /root/*
\ No newline at end of file
+rm -R /root/*
+
+ENV SHELL=/bin/bash
+
+# Enable sudo for wheel users
+RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' \
+    /etc/sudoers
+
+ENV HOST_USER_ID 5555
+RUN useradd -u $HOST_USER_ID -G wheel -ms /bin/bash user
+
+USER user
+WORKDIR /home/user
+
+ENV LANG C.UTF-8


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]