Skip to content

Instantly share code, notes, and snippets.

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