Improve dev environment init process

This ensures that /etc/passwd is always written, regardless of how the container starts.
This commit is contained in:
Shane McDonald
2019-05-10 10:14:51 -04:00
parent 015234287c
commit 7d8a910be7
5 changed files with 24 additions and 17 deletions

View File

@@ -1,13 +1,6 @@
#!/bin/bash
set +x
if [ `id -u` -ge 500 ] || [ -z "${CURRENT_UID}" ]; then
echo "root:x:0:0:root:/root:/bin/bash" > /tmp/password
echo "awx:x:`id -u`:`id -g`:,,,:/tmp:/bin/bash" >> /tmp/passwd
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
fi
# Wait for the databases to come up
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=postgres port=5432" all
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=memcached port=11211" all