Skip to content

Commit

Permalink
Update ps example to use a non-root user
Browse files Browse the repository at this point in the history
  • Loading branch information
hlovdal committed Oct 14, 2017
1 parent 6118946 commit 1277bbe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ 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'
```shell
$ docker run -it --rm alpine:edge su postgres -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
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
PID USER TIME COMMAND
1 root 0:00 ps aux
1 postgres 0:00 ps aux
```

## Why reinvent gosu?
Expand Down

0 comments on commit 1277bbe

Please sign in to comment.