Open amouat opened 1 year ago
+1 on doing this as a small rust/go binary!
The only thing that gives me pause is it's not very transparent; if it was a bash script it's a lot easier to see what's going on.
The only thing that gives me pause is it's not very transparent; if it was a bash script it's a lot easier to see what's going on.
I think a little static Go binary would be great, and not require a shell anymore.
Having to reimplement parts of some bash commands (like command
) seems like it might be annoying, but ultimately being able to have the benefits of an entrypoint.sh without a shell seems valuable.
would it be possible to support functionality similar to the templates described here: https://github.com/docker-library/docs/tree/master/nginx#using-environment-variables-in-nginx-configuration-new-in-119 ?
Please add this feature, it's necessary for many practical uses of nginx.
I currently use https://gitlab.com/black-snow/env-dump in some places. I could extend it if you tell me what you need.
Just heard from another customer that relies on this feature for nginx
How about using renvsubst instead of envsubst - this should be more aligned with the minimal container image approach.
We also rely on this feature, which is the primary reason we cannot use the chainguard image as is.
Thought I'd ask about the status of this feature since I'm updating the nginx
README.
Which image/versions are related to this issue/feature request?
All images that have configuration options, especially those that use a configuration file.
Issue/Feature description
Many container images from other providers support env var substitution - that is you can docker something like
docker run -e MYPORT=5000 myimage
to configure options on the image that would normal require editing and volume mounting a config file.This is fairly simple to do with a shell script and envsbst (https://man7.org/linux/man-pages/man1/envsubst.1.html). But it's a little more difficult in a minimal container without pulling in a shell (which I really don't want to do). My suggestion is to create a small reusable binary that runs as an entrypoint and doees this for us. We could extend: https://github.com/wolfi-dev/container-entrypoint