Debugging If you are using the following within your code to debug: import ipdb; ipdb.set_trace() Then you may need to run the following for it to work as desired: $ docker-compose -f file.yml run --service-ports image:tag 1 2