#!/bin/bash

cd "$(dirname ${0})"

docker build -t depenency-injection-tox --build-arg uid=$(id -u) . && \
if [ -d ".tox" ]; then
    docker run --rm --entrypoint="tox" -v "$(pwd)/.tox:/src/.tox" depenency-injection-tox "${@}"
else
    docker run --rm --entrypoint="tox" depenency-injection-tox "${@}"
fi

cd -
