Skip to content

Instantly share code, notes, and snippets.

@vbankov
Forked from dmrub/Dockerfile
Last active December 14, 2022 11:05
Show Gist options
  • Save vbankov/370a2af74977a2cd63633b02ad85f1a0 to your computer and use it in GitHub Desktop.
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
# 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