Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substitute env variables in config file #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonasengelmann
Copy link

Allow environment variables to be used in a schedule.ini file.

schedule.ini

[job-run "print-write-date"]
schedule = @every 5s
image = ${IMAGE} 
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock:ro -e IMAGE=ubuntu:latest mcuadros/ofelia:latest

See also this comment: #28 (comment)

@taraspos
Copy link
Collaborator

taraspos commented Mar 2, 2025

Have you tried to make this work using docker-compose and docker labels instead?

@jonasengelmann
Copy link
Author

I tried, but it did not allow me to use an env variable within a volume path. Trying to bind multiple volumes gets rather messy too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants