You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
689 B

#set -x
# Make errors visible upon `docker logs -f steam` command
exec 2>&1
id user >/dev/null 2>&1
[ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} user
echo 'export PATH="/usr/lib/ccache:$PATH"
export LC_ALL LANG' | tee /home/user/.profile
[ -f /home/user/.gitconfig ] || gosu user sh -c 'git config --global "user in docker"; git config --global "user@docker"'
# Set unlimited number of files and size of the cache:
gosu user sh -c 'ccache -F 0; ccache -M 0'
echo 'WARNING: allowing a user escalate to root'
chmod +s /usr/sbin/gosu
cd /home/user
gosu user bash -l