Jump to content

run container on occasion: best practices?


50Cal

Recommended Posts

Hi,

I want to run a docker container once in a while. I'm wondering what the best practices are.

 

Here is what I got:

A container runs a python script with an ENTRYPOINT directive so I can supply extra parameters.

A User Script (which I think is a cron job?) is planned to run the container periodically once with one set of parameters, and again with another set. something like :

docker run --rm pyscript args1
docker run --rm pyscript args2

However, I also have ENV variables in the Dockerfile I want to set. I would have to put them into the `run` comands.

I figured one solution would be to use `docker start` and create an UnRaid docker template with the variables all set there. But `start` doesn't allow for adding extra parameters.

 

My question is, what would be the cleanest way to do this?

Should I just suck it up and put the variables right in the script? If the variable is a password of sorts, is this as secure putting a password in an UnRaid docker template?

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...