diff options
Diffstat (limited to 'adei/docker-entrypoint.sh')
-rwxr-xr-x | adei/docker-entrypoint.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/adei/docker-entrypoint.sh b/adei/docker-entrypoint.sh index a82a970..f4d9f20 100755 --- a/adei/docker-entrypoint.sh +++ b/adei/docker-entrypoint.sh @@ -2,5 +2,11 @@ set -e +if ! whoami &> /dev/null; then + if [ -w /etc/passwd ]; then + echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd + fi +fi + echo "Running: $@" exec "$@" |