Can I find the Dockerfile used for the Pi3 Image (https://hub.docker.com/r/homeassistant/raspberrypi3-homeassistant/) somewhere? I would like to modify the Dockerfile and rebuild my own image for the Pi. I tried to build the Dockerfile from the Home Assistant repo, but it does not seem to work on the ARM platform.
Can’t help you in your quest to find that file.
However , you can always derive your image from the original one and then adapt it to your needs in your own Dockerfile.
Example here: ConBee ZigBee Stick and HA, will this work together?
Changing the base image will of the original image would not work though if that’s what you’re aiming for.
Thanks! However, I would like to be able to build my own image from the source files. Therefore, I would be interested in the Dockerfile used to built the pi3 image.
As far as I know, the rpi version is built using the same dockerfile as the x86 version:
The rpi version is built from that dockerfile on either an actual rpi or an emulator (eg. QEMU).
I tried to build this image myself on the pi, but it did not work:
[100%] Built target _cec
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/./cec-client-4.0.2
-- Installing: /usr/local/bin/./cec-client
-- Installing: /usr/local/bin/./cecc-client-4.0.2
-- Installing: /usr/local/bin/./cecc-client
-- Installing: /usr/local/bin/./pyCecClient
-- Installing: /usr/local/lib/python3.6/site-packages/cec/_cec.so
-- Removed runtime path from "/usr/local/lib/python3.6/site-packages/cec/_cec.so"
-- Installing: /usr/local/lib/python3.6/site-packages/cec/__init__.py
-- Installing: /usr/local/lib/pkgconfig/libcec.pc
-- Installing: /usr/local/include/libcec/cec.h
-- Installing: /usr/local/include/libcec/cecc.h
-- Installing: /usr/local/include/libcec/cecloader.h
-- Installing: /usr/local/include/libcec/cectypes.h
-- Installing: /usr/local/include/libcec/version.h
-- Installing: /usr/local/lib/libcec.so.4.0.2
-- Installing: /usr/local/lib/libcec.so.4
-- Installing: /usr/local/lib/libcec.so
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0
100 22.3M 100 22.3M 0 0 819k 0 0:00:27 0:00:27 --:--:-- 2363k
virtualization/Docker/scripts/phantomjs: line 15: /usr/bin/phantomjs: cannot execute binary file: Exec format error
The command '/bin/sh -c virtualization/Docker/setup_docker_prereqs' returned a non-zero code: 126
Do I need anything else to build this image with the Dockerfile in the official repo on a pi3?
Sounds like you are executing a container that is not suitable for the raspberry’s arm architecture.
Make sure you derive your image from homeassistant’s raspberry pi docker images. There is one for every pi version.
If you are Building from source you probably have to choose a different python base image as posted above. That one does not work on a
pi due to the same reasons. Check out the python images by resin. They offer one for a lot of platforms - including the pi.
Thats why I was looking for the Dockerfile which is used to build the official pi3 image (https://hub.docker.com/r/homeassistant/raspberrypi3-homeassistant/). I assume the arm compatible base image is specified there.
I haven’t found that one either… maybe it is generated only during the build process.
Btw, the python image I was talking about is :https://hub.docker.com/r/resin/raspberrypi3-python/
I’m using that one for AppDaemon for example.
Did you ever find the source Dockerfile or get the original to build on your RPi? I’m looking for the Dockerfile for the aarch64-homeassistant container so I do some testing on my Rock Pi 4B.
(Sort of) answering my own question: It appears the {arch}-homeassistant docker containers are built from the Hass.io Builder here: https://github.com/home-assistant/hassio-build/blob/master/builder/builder.sh#L467
This doesn’t really help what I’m trying to do (install socat in the aarch64 image) but just posting for completeness.