Official Dockerfile clarification / questions / input

Hi guys,

I’m just getting started with HA, love it so far.

Since pretty much all of my stuff lives in Docker containers on my RPi(s) I was pleasently surprised when I came across the Docker installation in the Getting Started guide. Since the official HASS Docker image is for the regular amd64 platform, I decided to build an Alpine Linux based armhf image with ZWAVE and all the bells and whistles and so on… The blueprint was the official HASS Dockerfile: https://github.com/home-assistant/home-assistant/blob/dev/Dockerfile .

In the process though, I came across some questions I was hoping you guys could help me out with. I’m aware that there are a lot of them, so please bear with me. I will go from top to bottom and reference the lines from the github repo.

  • line 9 and line 13: why pip-install cython AND apt-install cython3? From what I understood the pip installation should suffice as it will compile the needed stuff for Python 3
  • line 16, 17, 18, 19: in the https://github.com/home-assistant/home-assistant/blob/dev/script/build_python_openzwave script the pip-installed cython is downgraded to a lesser version. Question: why not pin it in the line 9
  • line 22 installs all the requirements from the corresponding file: this is probably a HASS design question. I noticed that a first start, HASS is installing some packages needed for autodiscovery into the profile directory. For instance netdisco. I thought I install the netdisco beforehand so HASS has it at runtime. I learned that HASS is installing those things anyway… So the question is: why install all the packages, if HASS is reinstalling (some) stuff at runtime? I would argue that it adds weight to the image for stuff that is going to be installed at runtime anyway…

For the time being this should be it. I’d like to point out that this isn’t criticism, it’s just me trying to wrap my head around some of the HASS stuff. Being new to it I might very well overlook some obvious things! On a similar note I don’t quite know i this thread is best located under “installation”, so please feel free to move it to some place better suited.

Thanks a ton guys.

Cheers
Ralph

1 Like

I wish I had some experience to help you but I haven’t used Docker yet. But your post is in the right place and no one is going to look at these questions as criticism; in fact if the docs are vague or incorrect you are helping to clarify the process.

Best I can offer but I am sure others will be looking and responding soon.

1 Like

Thanks mate! Appreciate it.

It goes without saying that I am willing to contribute the Dockerfile back if this is considered useful.

Ralph

…it would seem you were a tad optimistic about others pitching in on this one… :yum:

Cheers
Ralph

Well, I’ll just reply to keep the thread in the recents lists and hope. :slight_smile:

The other thing you can try is using the Gitter chat room. Lot’s of people there and in the evening a lot of devs hang out and answer questions.

Thanks man. I think I’ll give it a try later on… :thumbsup:

Cheers

1 Like

You’ll probably end up finding more Docker experience there as well. Good luck and post here if you get this solved so I know you’re good.

@bfqrst Did you ever end up getting more info on this? I am curious, as I am just getting into Docker and was looking to build a container on my Pi. There are other RPi containers available, but the Dockerfiles appear to be much more stripped down. I would like a more comprehensive container like the official one.

Someone mentioned here: https://hub.docker.com/r/homeassistant/rpi2-home-assistant/
That an up-to-date armhf docker image is easy to make. But I guess your problems lie with the fact that you want to base it of off Alpine?

Did you manage to create your own image based on alpine? I would be interested in using or extending it if you could share it.