Last active
May 8, 2024 17:07
-
-
Save dmrub/b311d36492f230887ab0743b3af7309b to your computer and use it in GitHub Desktop.
Dockerfile piece for installing su-exec in debian/ubuntu container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install latest su-exec | |
RUN set -ex; \ | |
\ | |
curl -o /usr/local/bin/su-exec.c https://raw.githubusercontent.com/ncopa/su-exec/master/su-exec.c; \ | |
\ | |
fetch_deps='gcc libc-dev'; \ | |
apt-get update; \ | |
apt-get install -y --no-install-recommends $fetch_deps; \ | |
rm -rf /var/lib/apt/lists/*; \ | |
gcc -Wall \ | |
/usr/local/bin/su-exec.c -o/usr/local/bin/su-exec; \ | |
chown root:root /usr/local/bin/su-exec; \ | |
chmod 0755 /usr/local/bin/su-exec; \ | |
rm /usr/local/bin/su-exec.c; \ | |
\ | |
apt-get purge -y --auto-remove $fetch_deps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment