1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00
awx/tools/docker-compose/entrypoint.sh
Shane McDonald 7d8a910be7 Improve dev environment init process
This ensures that /etc/passwd is always written, regardless of how the container starts.
2019-05-10 10:14:51 -04:00

15 lines
236 B
Bash
Executable File

#!/bin/bash
if [ `id -u` -ge 500 ] || [ -z "${CURRENT_UID}" ]; then
cat << EOF > /tmp/passwd
root:x:0:0:root:/root:/bin/bash
awx:x:`id -u`:`id -g`:,,,:/tmp:/bin/bash
EOF
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
fi
exec $@