From 6b220ab86b3adf2064de530a5b4deac6d3c03e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Maldonado?= Date: Wed, 14 Jun 2023 17:56:16 +0200 Subject: [PATCH] Update README.md: su-exec no longer needed on Alpine 3.8+ --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2b05173..31ad71d 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,19 @@ Notice how `su` will make `ps` be a child of a shell while `su-exec` just executes `ps` directly. ```shell -$ docker run -it --rm alpine:edge su postgres -c 'ps aux' +$ docker run -it --rm alpine:3.7 su postgres -c 'ps aux' PID USER TIME COMMAND 1 postgres 0:00 ash -c ps aux 12 postgres 0:00 ps aux -$ docker run -it --rm -v $PWD/su-exec:/sbin/su-exec:ro alpine:edge su-exec postgres ps aux +$ docker run -it --rm -v $PWD/su-exec:/sbin/su-exec:ro alpine:3.7 su-exec postgres ps aux PID USER TIME COMMAND 1 postgres 0:00 ps aux ``` +`su-exec` is no longer needed on Alpine 3.8+, `su` will execute the program +directly. It is however still useful on Debian 12 and probably other distros. + ## Why reinvent gosu? This does more or less exactly the same thing as [gosu](https://github.com/tianon/gosu) but it is only 10kb instead of 1.8MB. -