I have an interesting question related to scheduling my Docker Container.
I have a virtual machine with a docker image inside of it. I can spin up a container from the image that has an entrypoint (jar).
I am in a dilemna on how I should schedule the jobs to run against the jar.
Here are my 2 options:
1) If I run a cron on the VM then I can call the docker run commands to produce a container and run different jobs against the jar. The issue here is that once a single job is run, the container automatically terminates and the second job has no previous histroy of the previously run jobs. I believe theres a way to keep a container running forever with an entry point but I haven't explored/tested this yet.
2) I can install a cron inside of the container and through the Dockerfile provide the cron for updating - however, the issue here is how would I launch the container and keep it running for the cron jobs to run?
If you need any further details please do let me know.