2017-06-14 13:36:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-06-19 09:28:34 +02:00
|
|
|
USER_ID=${USER_ID:-30000}
|
2017-06-14 13:36:37 +02:00
|
|
|
|
|
|
|
# Create a non-root user that will perform the actual build
|
2017-06-19 09:28:33 +02:00
|
|
|
id builder 2>/dev/null || \
|
|
|
|
useradd --uid $USER_ID --create-home --home-dir /builder builder
|
2017-06-14 13:36:37 +02:00
|
|
|
|
2017-06-19 09:28:33 +02:00
|
|
|
cd /builder
|
|
|
|
exec gosu builder "$@"
|