Ok this is actually an improved version of the Docker image. The program (repo files) again are all within the /app/ dir of the image, and it's still badly built, but I've improved it.
To run it, we load in the docker image on an external terminal with
docker load -i hailstone-numbers.tar
Wait for it to finish loading, and then start a container with
docker run -d --name <my-container> hailstone-numbers:v1.1
Edit the content in the <>
as you'd like. This creates a running container, and this time, I've made it so that it automatically executes the following command on startup
python main.py -d hailstone -v single -p "27" -l 0 -t
This means that by default, every time you load up this docker image, you will run this command and get a "default" image generated within the /app/generated/ folder of your docker image. The -t
flag ensures the first instance of the python file never exits, so you can safely run any command either on the docker terminal directly or with an external terminal. Note that you can either do python main.py
or python /app/main.py
to run the file, and either way works. Docker automatically will know what you are trying to do (even though the current working directory is /app/). Again, all output images are within the /app/generated/ folder, which you can download from Docker Desktop or whatever Docker client you use.
If you're using the terminal within the Docker container, you may just directly run the main.py as such
python main.py <required and optional flags>
If you're using an external terminal, do this instead
docker exec <my-container> python main.py <required and optional flags>
You do not need to and should never use the --timeout
flag.