You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As expected, when I use this mode and mount a local directory, the local directory is owned by an arbitrary high user id (100069), which is mapped to root (uid 0) in the container. But when I then try to change the userid the container runs with to my own host user with --user 1000 (or user: 1000 in compose), the container gets stuck failing to chmod the data directory in the docker-entrypoint.sh:
chmod: /var/lib/postgresql/data: Operation not permitted
I'm trying to use the postgress docker image in the rootless docker daemon mode, which means that the entire docker daemon runs inside of a user namespace.
As expected, when I use this mode and mount a local directory, the local directory is owned by an arbitrary high user id (100069), which is mapped to root (uid 0) in the container. But when I then try to change the userid the container runs with to my own host user with
--user 1000
(oruser: 1000
in compose), the container gets stuck failing tochmod
the data directory in thedocker-entrypoint.sh
:I think this error is coming from
postgres/13/alpine/docker-entrypoint.sh
Line 40 in 3690694
but I don't understand why. I verified that the user inside the container is indeed
1000
by replacing thecommand
withid
.Command which can be run with docker rootless mod to reproduce the issue:
docker run --user 1000 -v "$PWD/data:/var/lib/posgresql/data" postgres:alpine
The text was updated successfully, but these errors were encountered: