-
-
Save vbankov/370a2af74977a2cd63633b02ad85f1a0 to your computer and use it in GitHub Desktop.
[su-exec - Install in Debian/Ubuntu Container] Quick-install su-exec in Debian based docker container #su-exec #debian #ubuntu #docker
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