I need to run a run a Python script in a Docker container (I currently have execution of "disco_test.py" as my ENTRYPOINT
command) that will utilize Disco (which of course needs to be running in that container). The problem is I cannot seem to get Disco running either with CMD
or RUN
in the Dockerfile, or from within the Python script itself (using the subprocess module).
If, however, I create an otherwise identical image with no ENTRYPOINT
command, run it with docker run -i -t disco_test /bin/bash
and then open a Python shell, I can successfully get Disco running using the subprocess module (simply using call(["disco", "start"])
works). Upon exiting the Python shell I can indeed verify that Disco is still running properly (disco status
reports "Master 0cfddb8fb0e4:8989 running"). When I attempt to start Disco in the same way (using call(["disco", "start"])
) from within "disco_test.py", which I execute as the ENTRYPOINT
command, it doesn't work! It will print "Master 0cfddb8fb0e4:8989 started", however checking disco status
afterwards ALWAYS shows "Master 0cfddb8fb0e4:8989 stopped".
Is there something about how the ENTRYPOINT
command is run that is preventing me from being able to get Disco running from within the corresponding Python script? Running "disco_test.py" on my machine (not in a Docker container) does indeed get Disco up and running successfully.
Any insights or suggestions would be greatly appreciated!