I want to build a Docker image to run a Python script. I added some files to the image during the building process and installed some python packages.
In the last line of my Dockerfile I have:
CMD ["python3", "script.py"]
I aim to run this script using the container, but I must provide some input files before running it. Building the image takes some time because I'm adding some large files, so I want to avoid building the image and moving the input files whenever I want to run the script.
Is it possible to do this?
I tried using docker create
and then copying the files with cp
, but I don't know how to run the container recently created.
I'm trying to work from this post https://stackoverflow.com/a/48265968/19257725