-
Notifications
You must be signed in to change notification settings - Fork 153
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
Templating does not work if only /tmp is writable #88
Comments
Let me look into this once I have some time and get back to you. It might be a little while (I have a hefty backlog atm) but I'll update the issue when I have had time to dig into this 😄 |
@lioman Probable I've faced the same issue:
In my case the reason was in
By default In my case I've solved the problem by setting GID of the user to So if you change UID/GID of the user (in docker compose config or create a new user in your Dockerfile) don't forget to update correspondent permissions for some paths:
|
Have you had a chance to try the above steps @lioman? |
We actually still have the problem. Changing the UID/GID to |
we're happy users of this docker image, but noticed that it is incompatible with kubernetes'
I'm not sure this can be easily fixed, since the entrypoint scripts relied on the config being writable, which is AFAIK against the philosophy of having |
You are correct in that the entrypoint script rely on the config being writable. The goal is to add some QoL config changes that are environment dependent. There might be room to host an image that doesn't do any of those changes but I'll have to think and talk to the maintainers of the upstream Docker NGINX image about it. |
To go back to the previous discussions, there is an option to change the default UID/GID by passing a new value as an ARG at build time(https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/mainline/alpine/Dockerfile#L15-L16). Setting a new value when the image is being built should change the NGINX UID, but you'll have to rebuild the image vs using the images on Docker hub. |
As work-around solution:
|
A message to passing by strugglers like me: No need to rebuild the image, you can make it work with just the right mount points. See this docker compose example: Kudos to @Meettya for the idea. |
Describe the bug
If you use nginx templating function the filled template can not be saved if
/etc/nginx/conf.d
is not writable.To reproduce
Steps to reproduce the behavior:
default.conf.template
in/etc/nginx/templates
/tmp
is writable/etc/nginx/conf.d
Expected behavior
In a unprivileged environment, I expect, that templates ca be written and used.
The text was updated successfully, but these errors were encountered: