This isn't associated with any particular issue, and I didn't think it would be helpful creating an issue + PR for each of these fixes, so I made a general cleanup PR. Let me know if this is bothersome and I can break it up. Here is the summary of changes:
There is a json syntax error in the version.json and the json package was misused, both causing a critical failure on startup.
Looks like unittest won out over tox, so I removed tox references and updated the Makefile with the right test cmds
Updated the examples to be generally runnable + show verbose output. With simple.py only one entrypoint was chosen given that there is a web.py there to illustrate how to use metaparticle with port requirements.
The logger names for the runner and builder have been changed to the modules parent name to be more generic. E.g. instead of metaparticle_pkg.runner.docker_runner it is just metaparticle_pkg.runner since only one runner can be used at a time, and changing runners shouldn't involve a code change to see the correct logs.
I wasn't able to reproduce https://github.com/docker/docker-py/issues/300 exactly as the docker_runner suggested, however, I believe it was a misdiagnosis. Without a tty in the container the buffered output that python defaults to will not be shown (so nothing was visible from a docker logs -f ...). The easy fix is to use unbuffered python (via the -u switch on the entrypoint in the Dockerfile).
This isn't associated with any particular issue, and I didn't think it would be helpful creating an issue + PR for each of these fixes, so I made a general cleanup PR. Let me know if this is bothersome and I can break it up. Here is the summary of changes:
version.json
and the json package was misused, both causing a critical failure on startup.unittest
won out overtox
, so I removed tox references and updated the Makefile with the right test cmdssimple.py
only one entrypoint was chosen given that there is aweb.py
there to illustrate how to use metaparticle with port requirements.metaparticle_pkg.runner.docker_runner
it is justmetaparticle_pkg.runner
since only one runner can be used at a time, and changing runners shouldn't involve a code change to see the correct logs.https://github.com/docker/docker-py/issues/300
exactly as thedocker_runner
suggested, however, I believe it was a misdiagnosis. Without a tty in the container the buffered output that python defaults to will not be shown (so nothing was visible from adocker logs -f ...
). The easy fix is to use unbuffered python (via the-u
switch on the entrypoint in the Dockerfile).