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

Can't run image with securityContext.readOnlyRootFilesystem: true #606

Open
coreydaley opened this issue Feb 5, 2025 · 1 comment
Open

Comments

@coreydaley
Copy link
Contributor

When setting the securityContext.readOnlyRootFilesystem: true on the container, the container fails to run, failing at https://github.com/sclorg/postgresql-container/blob/master/16/root/usr/share/container-scripts/postgresql/common.sh#L196-L205 while trying to create the /var/lib/pgsql/passwd file.

It looks like the bitnami postgresql container (https://github.com/bitnami/containers/tree/main/bitnami/postgresql) does not have the same issue and also has the readOnlyRootFilesystem set to true by default.

We are running the container on OCP 4, do you have any recommendations for working around this issue?

@Wisw
Copy link

Wisw commented Mar 30, 2025

I have an issue similar to this in OCP 4.7.x [Running Postgres in OpenShift with persistence volume is failing with user permissions issues]

But the init script does run at the start and try to own the folders with postgres user which is a root user.

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

No branches or pull requests

2 participants