mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 09:38:10 -03:30
Improve dev environment init process
This ensures that /etc/passwd is always written, regardless of how the container starts.
This commit is contained in:
14
tools/docker-compose/entrypoint.sh
Executable file
14
tools/docker-compose/entrypoint.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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 $@
|
||||
Reference in New Issue
Block a user