Read the statement by Michael Teeuw here.
Docker install on synology nas
-
I have been trying to install the karsten13/magicmirror docker image on my synology NAS. I’ve tried with docker run scripts ssh’d in as root as well as normal compose method.
The image always fails with this error in the log “mkdir: cannot create directory ‘/opt/magic_mirror/modules/default’: Permission denied”
I can install and run the older bastilimbach/docker-magicmirror image without this error, but it is no longer supported and the custom css doesn’t properly load anymore with this image.
Any advice would be greatly appreciated, I feel like I’m banging my head against a wall with this!
-
this turned out to be a permissions problem. the folder was created w the synology user, but the container is running as user 1000
-
to understand what is happening I need
- the full logs of the container
- the start command (full
docker run ...
or compose file)
-
@karsten13 of course thanks for checking it out.
Here is the docker start command:
docker run -d \ --name magicmirror \ --publish 8036:8080 \ --restart unless-stopped \ -e TZ=America/Chicago \ --volume /volume1/docker/magicmirror/config:/opt/magic_mirror/config \ --volume /volume1/docker/magicmirror/modules:/opt/magic_mirror/modules \ --volume /volume1/docker/magicmirror/css:/opt/magic_mirror/css \ karsten13/magicmirror:latest
and here are the logs of the container:
-
looks like the volumes on the host were created by
root
. The user in the container runs as usernode
with uid/gid 1000.So you can try
a) cd to
/volume1/docker/
on the host and runchown -R 1000:1000 ./magicmirror
(you have to do this asroot
)or
b) run the container as user
root
, you have to add--user root \
to the
docker run ...
command -
-
@karsten13 i think /opt is non existent on synology
-
@sdetweil said in Docker install on synology nas:
@karsten13 i think /opt is non existent on synology
but in the container
-
this turned out to be a permissions problem. the folder was created w the synology user, but the container is running as user 1000
-