How to run docker image on a selinux protected system Topic is solved

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
freekdk
Posts: 39
Joined: Monday 01 February 2021 16:33
Target OS: Linux
Domoticz version: V2025.1
Location: Netherlands
Contact:

How to run docker image on a selinux protected system

Post by freekdk »

I am trying to get the docker image of domoticz running on an openSUSE Leap 16.0 system with selinux protection.
I have docker running on that system and used the following to install an run the image:
# mkdir /opt/domoticz
# cd /opt/domoticz
echo <<EOF > docker-compose.yml
services:
domoticz:
image: domoticz/domoticz:stable
container_name: domoticz
restart: unless-stopped
# Pass devices to container
# devices:
# - "/dev/serial/by-id/usb-0658_0200-if00-port0:/dev/ttyACM0"
ports:
- "8080:8080"
volumes:
- ./config:/opt/domoticz/userdata
#- ./config/www/templates:/opt/domoticz/www/templates
environment:
- TZ=Europe/Amsterdam
- LOG_PATH=/opt/domoticz/userdata/domoticz.log
EOF
# docker compose up -d
After that
# docker log -f domoticz
shows:
2026-03-28 15:00:09.071 Launch: Begin container self-repair
rsync: [Receiver] mkdir "/opt/domoticz/userdata/plugins" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(791) [Receiver=3.2.7]
>f+++++++++ customstart.sh
rsync: [receiver] mkstemp "/opt/domoticz/userdata/.customstart.sh.dAaykK" failed: Permission denied (13)
and a lot more with " Permission denied (13)"

Any idea how to make it work?
freekdk
Posts: 39
Joined: Monday 01 February 2021 16:33
Target OS: Linux
Domoticz version: V2025.1
Location: Netherlands
Contact:

Re: How to run docker image on a selinux protected system

Post by freekdk »

I found the solution.
The line:
- ./config:/opt/domoticz/userdata
should be:
- ./config:/opt/domoticz/userdata:z
Post Reply