YOURLS/containers

Allow using Docker secrets for Environment Variables

Closed this issue ยท 12 comments

Summary
Many docker containers allow using Docker Secrets to pass in environment variables. It would be great to be able to input configuration through secrets.

Motivation
The mysql container can use secrets for its configuration. Using the same method of configuration for both would be great.

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Be able to append "_FILE" to any of the environment variables to be able to use the /var/secrets files as the source of the values.

Thanks for opening this issue @jhollowe!
And sorry for the delay...

This looks to be a neat suggestion, would you like to open a pull request with the change for this compatibility?

cohoe commented

@LeoColomb It seems that #57 hasn't made its way to the Docker Library. I read the notes in README and see there is a commit hash difference between the library-bot branch and the library master (docker-library/official-images@master...docker-library-bot:yourls). I don't know what opens the appropriate PR though. The last one was opened in early May while this feature was added in late June. Also feel like a change of this nature would merit a version bump (1.7.10?, 1.8.0?) especially since the 1.7.9 tags are already out there. Could you advise?

@cohoe Arf, good catch indeed, the bot did the job but there is still a manual step which has to be done by Docker team.
@tianon do you know? ๐Ÿ™‚ docker-library/official-images@master...docker-library-bot:yourls
Thanks!

It's waiting for an image maintainer to make the PR ๐Ÿ˜„

If it would help, we can have the bot push that branch to a fork that you have access to so you can open the PRs more directly?

@tianon We can't...

image

If it would help, we can have the bot push that branch to a fork that you have access to so you can open the PRs more directly?

๐Ÿ˜‰๐Ÿ˜‡

cohoe commented

@LeoColomb does @tianon 's comment make sense? I'm not sure what branch is being referred to there.

@cohoe Half sense ๐Ÿ˜‰ (more seriously, I would prefer everything to be automatic on this case but I understand there are some constraints).

@tianon Ok: https://github.com/LeoColomb/official-images
Thanks!

Sounds good -- can you grant access to @docker-library-bot?

(You're also welcome to create your own automation if you prefer the process be fully automated end-to-end, but we ask that you make sure whatever you create doesn't go overboard with creating PRs on a high frequency and that it CCs any relevant human maintainers so that you see if we provide review comments on the PR.)

@tianon Done! (ok ๐Ÿ™‚)