Simple Docker image to run pytest on python (3.8) code.
Navigate to your project directory and then...
docker run -ti -v "/$PWD:/usr/src/app/" mrspence/pytest
docker run -ti -v "$PWD:/usr/src/app/" mrspence/pytest
In docker-compose.yml
version: '3'
services:
test:
image: mrspence/pytest
volumes:
- "./:/usr/src/app/"
Then, in your terminal:
docker-compose run test