I'm running an application under development with docker-compose.
I have a "web" service running a python Flask web application. This service depends on other ones (database, cache, ...).
I need to run the "web" main service interactively in order to get access to a debugger (ipdb). I found out that the way to do this would be
docker-compose run --name my-app.web --service-ports web
When I exit this container and try to run it again with the same command I got this error:
ERROR: Cannot create container for service web: Conflict. The container name "/my-app.web" is already in use by container "4fed84779bb02952dedb8493a65bd83b1a6664f066183233e8c8b4dc62291643". You have to remove (or rename) that container to be able to reuse that name.
How can I start again this container without creating a new one ?
Or is it the correct way to create new containers each time I need to start this application ?
Or did I miss something to be able to start one of the service interactively ?