I am embarking on my first attempt at utilizing a docker container. I have a python script that calls a couple API\'s and parses a file. The script took parameters for the
The way you do it depends on how your using docker. If you want to run your script in an already running container, you can use exec:
docker exec python
Alternatively, if you have a docker image where your script is the ENTRYPOINT, any arguments you pass to the docker run command will be added to the entrypoint.
So, if your docker file looks like this:
FROM yourbase
....
ENTRYPOINT
Then you can just run the script by running the container itself:
docker run --rm
Based on your comment below, it looks like you want this option. You should change your dockerfile to specify
ENTRYPOINT ["python","./script.py"]
(instead of using CMD) and then you can run via:
docker run --rm -a API_KEY - f FILENAME -o ORG_ID