Run tests in Docker as non-root user

This commit is contained in:
Shane McDonald
2018-10-09 13:59:46 -04:00
parent 40602875e0
commit 7a5cfd05a3
4 changed files with 52 additions and 13 deletions

View File

@@ -1,4 +1,12 @@
#!/bin/bash
set +x
if [ `id -u` -ge 500 ]; then
echo "awx:x:`id -u`:`id -g`:,,,:/var/lib/awx:/bin/bash" >> /tmp/passwd
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
fi
cd /awx_devel
make clean
cp -R /tmp/awx.egg-info /awx_devel/ || true