Running multiple python main files off Docker image

I have created a Docker image with dockerfile where the Entrypoint is as follows:

ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "myproject", "python", "./", "--config", "./"]

When I run I use the command:

docker run myproject

all is fine it seems. However I have a secondary .py file in the root of the project called The purpose of this file is to update some of the config and json files after getting some input from the user.

Is there a way to run this secondary file ( or do I need to create a whole new image (which seems ridiculous).



Well… if you got an image, you don’t have to use entrypoint… just run your scripts like this:

docker run image "python /some/path/"


docker run image /bin/bash -c "cd /some/path && python"

or with entry point

RUN ./ --config ./
RUN ./ --config ./
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "myproject", "python"]