match outer uid within docker container, to avoid ownership/permissions issues with mounted volumes

This commit is contained in:
Noah Levitt 2015-10-30 19:53:20 +00:00
parent 58a7d48cd5
commit 1f64ad84d6

View File

@ -9,11 +9,11 @@ user=$(id -un)
for python in python2.7 python3.4
do
docker run --rm --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \
bash -x -c "cd /rethinkstuff \
docker run --rm -it --volume="$script_dir/..:/rethinkstuff" internetarchive/rethinkdb /sbin/my_init -- \
bash -x -c "adduser --gecos=$user --disabled-password --quiet --uid=$uid $user \
&& sudo -u $user bash -x -c 'cd /rethinkstuff \
&& virtualenv -p $python /tmp/venv \
&& source /tmp/venv/bin/activate \
&& pip install pytest . \
&& py.test -v -s tests"
&& py.test -v -s tests'"
done