To set up a convenient test/preprod/dev system I wanted to install openhab in a docker container on my Mac. I followed the guidelines in https://www.openhab.org/docs/installation/docker.html but it won’t work on my Mac.
in the logs I find permission errors like
cp: cannot create directory '/openhab/userdata/./etc': Permission denied
cp: cannot create directory '/openhab/userdata/./logs': Permission denied
but I exported the correct id’s that are on my Mac which I found using
id openhab
result in
uid=502(openhab) gid=20(staff) groups=20(staff),503(openhab),12(everyone),61(localaccounts),703(com.apple.sharepoint.group.3),100(_lpoperator),701(com.apple.sharepoint.group.1),702(com.apple.sharepoint.group.2)
so I start the container with
docker run \
--name openhab \
--net=host \
-v /opt/openhab/conf:/openhab/conf \
-v /opt/openhab/userdata:/openhab/userdata \
-v /opt/openhab/addons:/openhab/addons\
-d \
-e USER_ID=502 \
-e GROUP_ID=503 \
openhab/openhab:snapshot-debian
also with sudo docker … doesn’t work
And yes… in the docker preferences I exported the /opt/openhab directory and the permissions seem correct as can be seen here
drwxr-xr-x 2 openhab openhab 64 26 Jul 17:36 addons
drwxr-xr-x 2 openhab openhab 64 26 Jul 17:36 conf
drwxr-xr-x 2 openhab openhab 64 26 Jul 17:36 userdata
Any idea?