That's a good idea. I usually have a 'myproject-debugtools' container that just operates on the same volume and maybe even shares a network with the 'myproject-prod' container. Just set it to `--restart no` and even when someone forgets to shut it down it'll be gone on reboot. That way all the non-prod stuff isn't even in the image at any point.
Or if that is too much work just have a 'myproject-dev' image/tag if you need to debug a live environment.
Or if that is too much work just have a 'myproject-dev' image/tag if you need to debug a live environment.