I'm using OSS filesystem in Alibaba, similar to S3 in AWS.
Can someone assist why this is happening?
Same issue https://github.com/docker-library/postgres/issues/361
As Yosifkit said: this seems like a general debugging question and not really a problem with the image, it'd be better to post questions like this in the Docker Community Forums, the Docker Community Slack, or Stack Overflow.
Closing since this issue is environmental, not something we can really fix in the image.
this seems like a general debugging question and not really a problem with the image
Its a clear BUG to me, I say reopen and address it rather than closing it because you found "other related issue" which is also closed btw. That is why it was not resolved because you keep closing the issue. Let other people see and solve it rather than burying it into the deep.
It sounds to me like the filesystem you're using (or the driver you're using to access it) do not support chown -- you'll need to either resolve that or run the image directly as a user with access to the filesystem so that it skips the chown code (with --user on docker run; there should be a similar option for Kubernetes).
As far as I can see, there's nothing we can change about the _image_ to fix this environment-specific issue?
Sounds good enough, the filesystem permission can be changed via the UI so I guess that solves it. Maybe address a proper error if something fails specifically to this error? That could be a big help to anyone.
you'll need to either resolve that or run the image directly as a user with access to the filesystem so that it skips the
chowncode (with--userondocker run; there should be a similar option for Kubernetes).
Use securityContext in k8s to specify the user, but the pod can not start:
# kubectl logs -f test-5fc6b7bbf4-v7425
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: directory "/var/lib/postgresql/data/pgdata" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/var/lib/postgresql/data/pgdata" or run initdb
with an argument other than "/var/lib/postgresql/data/pgdata".
Most helpful comment
Its a clear BUG to me, I say reopen and address it rather than closing it because you found "other related issue" which is also closed btw. That is why it was not resolved because you keep closing the issue. Let other people see and solve it rather than burying it into the deep.