Releases: CaptainChicky/Hailstone-Numbers
Docker Image v1.1
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.
Docker Image v1.0
Docker Image. The program is within the /app/ directory in the docker image. Badly built, so do as follows.
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.0 python /app/main.py <required and optional flags> -t
Edit the content in the <>
as you'd like. This creates a running container that times out so never exits. All output images are within the /app/generated/ folder, which you can download from Docker Desktop or whatever Docker client you use.
Now you can execute additional commands within this container. Either in an external terminal, or within docker's own terminal as such
docker exec <my-container> python /app/main.py <required and optional flags>
You do not need to use the --timeout
flag again, or else you have to force quite the command using ctrl+c
.
I'll admit this method is quite crude, but whatever.