(SOLVED) HA installation in OpenWRT using Dockers

Hi

I have a new NanoPi R4S (SBC) working with OpenWrt and I’d like to use for Home Assistant as previously made with my RPi… but now with Docker.

I’m trying to use this code

`

docker run -d --name=“home-assistant” -v /home/pi/docker/hassio:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:stable

`

It seems there is a problem with the creation of the variable

-v /etc/localtime:/etc/localtime:ro

I recreated the docker without that line and apparently there is not any error but the ports are not created and I don’t have access to GUI :frowning:

Help… and HAPPY NEW YEAR!

Check the logs …

Not any LOGs but at least an message from the Docker terminal:

root@NanoPi:~# docker: Error response from daemon: error while creating mount source path ‘/etc /localtime’: mkdir /etc/localtime: file exists.

Strange. The Docker volume (-v) parameter creates a directory on demand and „injects“ it at given position into the containers file system.

/etc/localtime should already exist on the host and be a symlink to /usr/share/zoneinfo/Europe/Berlin (in my case). Maybe it‘s different with OpenWRT.

You could alternatively try to pass the timezone as environment variable instead. Replace the -v argument by -e TZ=Europe/Berlin (or what is appropriate at your location)

Thank you but using now

> docker run -d --name="home-assistant" -v /home/pi/docker/hassio:/config -e TZ=Europe/Madrid --net=host homeassistant/home-assistant:stable

the error is:

> root@NanoPi:~#docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"/init\": stat /init: no such file or directory": unknown.

Solved!

I’ve just “converted” my /etc/localtime from a “symlink” to a raw/text file (with UTC as only content inside) and now it’s working fine :wink:

Thank you @m0wlheld