Skip to content

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented Oct 8, 2025

Fix #11031

@github-actions github-actions bot added the docker label Oct 8, 2025
@github-actions github-actions bot added the helm label Oct 8, 2025
@kiblik kiblik force-pushed the nginx_readonly branch 3 times, most recently from 3352df0 to f02448f Compare October 8, 2025 21:14
@Maffooch
Copy link
Contributor

@mtesauro does this fit into your plans for image hardening?

@mtesauro
Copy link
Contributor

@mtesauro does this fit into your plans for image hardening?

TBH, I was going to start with the DefectDojo/Django containers first as those are the containers where we have the most code / do the most modifications.

Changing the UID to under the typical 1000+ is interesting but I don't believe it will cause issues for k8s and it also seems that OpenSift has stopped wanting specific UIDs based on this so this shouldn't hurt those using k8s or compose currently as far as I can tell.

@mtesauro
Copy link
Contributor

I can test this PR out when it's not a draft as well

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@kiblik
Copy link
Contributor Author

kiblik commented Oct 11, 2025

I can test this PR out when it's not a draft as well

The current issue with this PR is that as soon as the process tries to modify configs

sed -i '/listen \[::\]:/d' "$NGINX_CONFIG"

sed -i "s/#stub_status/stub_status/g;" $NGINX_CONFIG

sed -i "s/#auth_basic/auth_basic/g;" $NGINX_CONFIG

echo "$METRICS_HTTP_AUTH_USER":"$openssl_passwd" >> /etc/nginx/.htpasswd

execution fails (because FS is read-only).

I'm considering creating a separate PR that will be responsible for generating the final config, which will be on a read-write location. It would combine multiple partial definitions of the nginx.conf file. Also, I would like to merge it with nginx_TLS.conf because most of the file is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants