Permission issues when running docker image on RP2

I have a RP2 with docker currently running Pi Hole as a Docker Container. Now I also wanted to run HA in its own container. I followed the guide here Raspberry Pi - Home Assistant and ran it like this:

docker run --init -d --name="home-assistant" -e "TZ=Europe/Stockholm" --restart=unless-stopped -v /home/pi/homeassistant:/config --net=host ghcr.io/home-assistant/home-assistant:stable

Docker will now pull the latest image and start it. However when I run docker ps, it seems to restart:

CONTAINER ID   IMAGE                                          COMMAND      CREATED         STATUS                           PORTS     NAMES
94b36f8c041e   ghcr.io/home-assistant/home-assistant:stable   "/init"      5 minutes ago   Restarting (129) 2 seconds ago             home-assistant

Going to http://192.168.x.x:8123/ does not work, it refuses to connect.

Docker log states that something is wrong with permissions or time?

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76f2c020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76fec020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76fec020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76f29020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76fa8020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76f0e020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76fd4020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted

Current thread 0x76fc8020 (most recent call first):
<no Python frame>
[finish] process exit code 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

How can I get it working from here?

Run “docker run” command as sudo?

Use the docker container for RasPi?
homeassistant/raspberrypi2-homeassistant:2021.12.6

I tried sudo but it did not help. I also tried the RP2 image but same results.

I found this, could it be related? Migration to 2021.7 fails: Fatal Python error: init_interp_main: can't initialize time - #17 by Daniel3D

I have libseccomp2 (2.3.3-4) installed but I should use 2.42 or newer.

I think I was just about to share same with you.

Yes. Could be. Or folder permission. What happen if you just try to run image without any args or mounted volumes?

Hmm, I I just do

sudo docker run homeassistant/raspberrypi2-homeassistant:2021.12.6

Its still the same error

I know HA Supervised is only supported on a minimum of a Pi3. I would expect that is also true for HA Container installation. In fact that page you linked to only mentions a Pi 3 and above.

Yeah I guess 32 bit vs 64 is the main reason there.

A Pi 3 32-bit is OK.

I just tried 2021.6.6 instead as this was the versions before libsecomp2 2.42 was needed. It started working. :slight_smile:

So its probably that. Now I just need to figure out how to install a newer version.

If you do, the developers will not support that low a hardware class. You will be unlikely to fond somebody here running on a Pi 2 to assist either.

wget -qO- https://git.io/JPXdj | bash

This seemed to work.

Sure, Im just doing this for testing. Unfortunatly RP4 is out of stock everywhere and I’m not paying scalper prices. :slight_smile:

1 Like