The problem is every time I make a change the container syncs and then tries to restart, failing with a ModuleNotFoundError: No module named 'apidata.api' error over and over again. I’d assume the file got copied into the wrong place, but I can’t exec into the container to check, as it’s always restarting.
What should the configuration be, or how can I debug what’s going on?
even in that case you can stop the container and use docker cp to copy files out from the stopped container. Or on a Linux host using Docker CE, you can use docker container inspect to find the “merged” dir of the overlay filesystem and browse the files there.
It wasn’t the ./appinfo path causing the problem — even when I changed it to target /app/appinfo or commented it out completely I still saw the problem — but by using docker cp I was able to verify the app file was being overwritten successfully. It looks like there was some odd misconfiguration in the app which was triggered by the copy/restart and by fixing it I was able to resolve the problem.