coveragepy
coveragepy copied to clipboard
Unable to get .coverage file in local system when using docker compose up
I am unable to get .coverage file in local system when using docker compose up
. But .coverage file is getting emitted in case of docker compose run
command but not in up
I am mounting my current working directory in docker container, and also changing the current working directory in container to the current dir in local.
the below is my docker-compose file:
services:
flask-app:
image: flask-app:1.0
container_name: flask-app
build:
context: .
ports:
- "6000:6000"
volumes:
- ${PWD}:${PWD}
working_dir: ${PWD}
https://github.com/AkashKumar7902/flask-app the above is a minimalist reproducible app.
First run docker compose up
and stop the app, you won't find any .coverage file.
After that, run docker compose run flask-app
, the difference can be seen.