Skip to content

Commit

Permalink
readme: add examples and mention gosu
Browse files Browse the repository at this point in the history
  • Loading branch information
ncopa committed Dec 8, 2015
1 parent 74ef674 commit 4e451f0
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# su-exec
switch user and exec
switch user and group id, setgroups and exec

This is a simple tool that will simply execute a program with different
privileges. The program will not run as a child, like su and sudo, so we
work around TTY and signal issues.


```console
$ docker run -it --rm alpine:edge su -c 'ps aux'
PID USER TIME COMMAND
1 root 0:00 ash -c ps aux
12 root 0:00 ps aux
$ docker run -it --rm -v $PWD/su-exec:/sbin/su-exec:ro alpine:edge su-exec root ps aux
PID USER TIME COMMAND
1 root 0:00 ps aux
```

## Why reinvent gosu?

This does more or less exactly the same thing as `gosu` but it is only 10kb instead of 1.8MB.

0 comments on commit 4e451f0

Please sign in to comment.