Replies: 6 comments
|
Hey @alioth9, please provide your complete To double check I installed a fresh Fedora 43, installed I checked the subuid and subgid for my user with created a directory services:
otterwiki:
image: redimp/otterwiki:2
restart: unless-stopped
ports:
- "8080:80"
volumes:
# The :Z suffix is essential for rootless Podman on SELinux systems (Fedora, RHEL)
- ./app-data:/app-data:ZStarted it up with and An Otterwiki came up at port 8080 as expected. The files created in So running An Otter Wiki with rootless podman in general works. Will test how to keep the uid next. |
|
tl;dr: Running An Otter Wiki rootless with podman while using the current user UID in the mounted directory can be run using with the x-podman:
in_pod: false
services:
otterwiki:
image: redimp/otterwiki:2-slim
userns_mode: keep-id:uid=33,gid=33
restart: unless-stopped
ports:
- "8080:8080"
volumes:
# The :Z suffix is essential for rootless Podman on SELinux systems (Fedora, RHEL)
- ./app-data:/app-data:ZThe The full image is running as root, the nginx is listening on port 80 and uses the uid 33 only for the application itself. So mapping the uid is more complicated. If anyone figures this out, please share the solution. |
|
Thanks for the quick reply
Sorry If I was not clear, I have no problem with the base here is my base docker-compose.yaml version: "3"
services:
otterwiki:
image: redimp/otterwiki:2
restart: unless-stopped
ports:
- 8080:80
volumes:
- ./app-data:/app-data
environment:
PUID: 1000
PGID: 1001but I also try other parameters For now I only tried the normal version but I will have a look at -slim |
|
Tested and version: "3"
x-podman:
in_pod: false
services:
otterwiki:
image: redimp/otterwiki:2-slim
restart: unless-stopped
ports:
- 8080:8080
volumes:
- ./app-data:/app-data
userns_mode: keep-id:uid=33,gid=33 If I may ask a few more questions What are the drawback with the Also why Anyway, now I have a working wiki to fill 😁 . Need to try it and will come back if it doesn't works. |
|
Horray 🥳 Thanks for the feedback and sharing your solution!
None. There are some environments where running a container with
As explained above: "The full image is running as root, the nginx is listening on port 80 and uses the uid 33 only for the application itself. So mapping the uid is more complicated." Let me add some details: The container is running as one user, root (uid=0) that runs chmod and chown commands in |
|
Rereading, I saw the explanation, thanks for the added details. Maybe it would be useful to add some x-podman:
in_pod: false
services:
otterwiki:
image: redimp/otterwiki:2-slim
userns_mode: keep-id:uid=33,gid=33
restart: unless-stopped
ports:
- "8080:8080"
volumes:
# The :Z suffix is essential for rootless Podman on SELinux systems (Fedora, RHEL)
- ./app-data:/app-data:Z |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, thanks you for the good work.
I don't know if it should go into Issues or if there is something i don't see. Or if it is not possible to do with
otterwiki.I want to build an
otterwikiviapodman composerootless and with user permission to rw files inapp-data/.Something like #252 but rootless.
For now, i follow recommandation and add
to the docker-compose.yml
I am able to access directory as user if i start container as root.
If I start the otterwiki container rootless
app-data/get chown according to subuid/subgid and is not accessible to user.Previously I manage that use case with dokuwiki (via
podman compose) like so indocker-compose.yml(picked somewhere)or another proposed solution is using
userns_mode: keep-idin_pod: falseis necessary becauseusernsneed to disable in-pod.But in those case the
otterwikiis inaccessible and i get errors in logs likeor
If someone as manage to have
otterwikirunning rootless and with user acces to data, could you share the docker-compose file, orpodman run ...? Else. could you give me some hints ?Hope it is clear, sorry for the long post
Note, I am still quite newb to container and all...
All reactions