[SOLVED] QNAP Docker install localtime error

Im attempting to move from a Pi to my Qnap NAS using docker (not container station) but am running into a problem and need some help.
I have all my folder and permissions properly configured but I am getting an error on run. I have my script setup as
docker run
–name openhab
-v /etc/localtime:/etc/localtime:ro
-v /etc/timezone:/etc/timezone:ro
-v $DIR_CONF:/openhab/conf
-v $DIR_USERDATA:/openhab/userdata
-v $DIR_ADDONS:/openhab/addons
-e USER_ID=$(id -u openhab)
-e GROUP_ID=$(id -g openhab)
–publish 8190:8190
–publish 8191:8191

but when I run I am getting an error of " /merged/etc/timezone \" caused \“not a directory\”""

and I have checked \etc on Nas and localtime is in fact a file and not directory but I am only attempting to r and not write so this should not be an error right?

Any ideas or help. Thanks

What about timezone? That’s the file that the error is complaining about.

Thanks for the reply.

Ahh. Yes. I kept overlooking the fact that it is referencing timezone and not localtime. Ok so now I see that it is listed as a directory on my QNAP and not as a file. When I look in that directory its empty. I tried making it etc/timezone/timezone on both sides but I still get same error. Any ideas what I can do?

I am not a linux or Docker or QNAP, OpenHAB expert and am trying to piece this together from info I found on line.


All I can recommend is that timezone works differently on QNAP than it does in the container. You may not be able to map it into the container like this.

But you can create a file to hold the timezone. It’s in the standard <country>/<city> format (e.g. mine is America/Denver). The file can be anywhere on the host.

Thanks for the Help. I renamed the timezone dir to timezone1 and created a timezone file with my info and it seems to work.