Compose: Cannot do interactive debugging (without recreating the container)

Created on 12 Nov 2015  ·  3Comments  ·  Source: docker/compose

Currently I can do interactive debugging with

docker-compose run --service-ports web

This is as described in issue #359 . But over time I end up with many containers, as run creates a new one each time.
I would like something like:

docker-compose start --bind web

Something to start all the containers, but be able to do interactive debugging of a specific one.
I'm using pry

Most helpful comment

For those reaching this issue from google (docker compose + interactive debugging).
I'm currently debugging using stdin_open: true in docker-compose.yml and when the program reaches binding.pry or embed() or your favorite debugger, I do docker attach containername and get to the debugger.

All 3 comments

You can use docker-compose run --service-ports --rm to remove the container once it exits.

Thanks!

For those reaching this issue from google (docker compose + interactive debugging).
I'm currently debugging using stdin_open: true in docker-compose.yml and when the program reaches binding.pry or embed() or your favorite debugger, I do docker attach containername and get to the debugger.

Was this page helpful?
0 / 5 - 0 ratings