diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-01-11 07:22:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-11 07:22:33 +0100 |
commit | 988a099f98e5cfb1b15d8b2adb45277342ac0304 (patch) | |
tree | 2b4d1ccc2f69329a43643adfdc505a71991f571f /scripts/docker-entrypoint.sh | |
parent | 8a9050fffd8b1621a93a658624ea531818647511 (diff) | |
parent | 362ea8acb5978704e759c9bd112b84e4e0eb50de (diff) | |
download | vyos-build-988a099f98e5cfb1b15d8b2adb45277342ac0304.tar.gz vyos-build-988a099f98e5cfb1b15d8b2adb45277342ac0304.zip |
Merge pull request #36 from runborg/current
Compile frr, set user with gosu in docker and fixup of logging and errors in build-subpackages
Diffstat (limited to 'scripts/docker-entrypoint.sh')
-rwxr-xr-x | scripts/docker-entrypoint.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh new file mode 100755 index 00000000..7520a8d9 --- /dev/null +++ b/scripts/docker-entrypoint.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +# Use GOSU_USER if its specified, else wirking dir user +if [ -n "$GOSU_USER" ]; then + ID=$GOSU_USER +else + ID=$(stat -c "%u:%g" .) +fi + +# Don't use GOSU if we are root +if [ ! "$ID" = "0:0" ]; then + exec gosu $ID "$@" +else + exec "$@" +fi |