1

I'm a Docker newbie, using Docker on Mac. I'd like to debug it because I can't understand why it's doing what it's doing.

I figured I'll just find the Python files (in my case the file network.py in compose,) edit them to run my debugging logic, and then run docker.

The file I found and edited is at /usr/local/Cellar/docker-compose/1.24.1/libexec/lib/python3.7/site-packages/compose/network.py but even though I edited it, Docker doesn't seem affected, I'm not sure if it even uses that file. I tried entering 1 / 0 into that file and Docker still works, so I conclude it's not even using that file.

Where are Docker's actual Python files that it uses?

Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
  • This question is not very clear. **What** are you trying to debug? Are you having a problem with Docker or Docker Compose that you're trying to figure out? – Daniel Mann Nov 10 '19 at 16:09
  • Docker is mostly in Go, FWIW. If you are actively trying to work on Compose I'd clone https://github.com/docker/compose and work on a development tree, rather than trying to edit my Homebrew installation in place. – David Maze Nov 10 '19 at 19:06
  • Does this answer your question? [Where are Docker images stored on the host machine?](https://stackoverflow.com/questions/19234831/where-are-docker-images-stored-on-the-host-machine) – Rob Nov 11 '19 at 13:04
  • @Rob It doesn't because I'm not looking for the images, I'm looking for the Python code that compose runs. – Ram Rachum Nov 13 '19 at 06:45
  • @DanielMann I'd like to run a `docker compose` command and debug it, i.e. have a breakpoint in its code. – Ram Rachum Nov 13 '19 at 06:46
  • @DavidMaze I prefer to run from my installed Docker rather than downloading the source. – Ram Rachum Nov 13 '19 at 06:46

0 Answers0