mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-07 14:34:59 +00:00
The busybox adduser and addgroup commands are ignored by docker, as it avoids symlinks, but they are not compatible so this is kind of a good idea. See https://github.com/docker/docker/blob/master/pkg/idtools/usergroupadd_linux.go However, these do not yet deal with creating mapping ranges in /etc/subuid and /etc/subgid, so initially we provide a set that match the default docker name so at least docker daemon --userns-remap=default should work. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
14 lines
202 B
Bash
Executable File
14 lines
202 B
Bash
Executable File
#!/bin/sh
|
|
|
|
for a in $*
|
|
do
|
|
[ "$a" = "-N" ] && a=""
|
|
[ "$a" = "-M" ] && a="-H"
|
|
[ "$a" = "-g" ] && a="-G"
|
|
args="$args $a"
|
|
done
|
|
|
|
echo $args
|
|
|
|
exec /usr/sbin/adduser -D ${args}
|