Open AdamJel opened 2 months ago
Since you're running RHEL, I assume SELinux i also configured and active on your machine.
If that is the case, you have to modify the context for the container:
volumes:
- ../mosquitto/conf:/mosquitto/config;Z
- ../mosquitto/data:/mosquitto/data:Z
- ../mosquitto/logs:/mosquitto/logs:Z
(see Podman Documentation - Volumes for more information)
PS: I never use compose files, but I assume it's the same syntax. :sweat_smile:
Hello,
while my basic setup works without any issue on Windows Docker Desktop, I cannot get it up and running on rhel with rootless Podman. I think I tried everything I and chapGPT could think of, but nothing worked.
Project structure:
conf file
The issue is with file permissions. I map local files to the container:
Starting it from / with
podman compose -f docker/compose.yaml up -d
and then... compose ... logs
gives:I tried setting up every possible combination. I even created the user 'mosquitto' on the local machine, so that I could set the ownership directly to that on the local, so:
id mosquitto
->$ id mosquitto uid=1883(mosquitto) gid=1883(mosquitto) groups=1883(mosquitto)
When I apply this ownership to the entire /mosquitto directory
ls -la mosquitto
:Then compose down and up -d again -> still the same issue. When I exec into the container directly, this is output for ls -la:
So it seems like the ownership is not propagated into the container or something. But honestly, my knowledge of container, linux, podman, etc. ends right here. I don't know what is going wrong, nor how to diagnose.
Again, if I run the same command (oh well "docker" instead of "podman") on my local machine, it just works.
I humbly beg for help :)