UID mapping works for standalone container, but fails when using a pod #24939
-
I am trying to run a rootless pgadmin container. My host user is 2012:2012. The user inside the container is 5050:0. The following command starts the container successfully:
If I try to run the container in a pod, the command fails:
If I try to fix the issue, I get a different error:
I saw some articles related to the "devpts" error, stating that I needed to remap at least 65356 UIDs, but that gave me an error also. What is my best way forward? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I'm able to reproduce the error message
with this bash script that I think is more or less the same what you do start1.sh
If I modify the bash script somewhat, the error goes away --- start1.sh 2025-01-04 23:04:11.357711588 +0000
+++ start2.sh 2025-01-04 23:04:26.236928398 +0000
@@ -22,9 +22,8 @@
podman volume create $volume
podman pod create \
- --uidmap ${container_uid}:@${host_uid}:1 \
- --uidmap 0:1:1000 \
- --gidmap ${container_gid}:@${host_gid}:1 \
+ --uidmap +${container_uid}:@${host_uid}:1 \
+ --gidmap +${container_gid}:@${host_gid}:1 \
--network $network \
--publish ${port}:80 \
--name $pod
@@ -35,7 +34,6 @@
--pod $pod \
--env PGADMIN_DEFAULT_EMAIL=$email \
--env PGADMIN_DEFAULT_PASSWORD=$password \
- --publish ${port}:80/tcp \
--volume ${volume}:/var/lib/pgadmin \
--detach=True \
docker.io/dpage/pgadmin4:latest
start2.sh Click me
|
Beta Was this translation helpful? Give feedback.
I'm able to reproduce the error message
with this bash script that I think is more or less the same what you do
start1.sh