Dockerfile 896 B

123456789101112131415161718192021222324252627
  1. FROM python:3.7
  2. RUN find /usr/bin -type f -perm /u+s -exec echo chmod --changes u-s {} \;
  3. RUN find /usr/bin -type f -perm /g+s -exec echo chmod --changes g-s {} \;
  4. # required to build python_openzwave
  5. # https://github.com/OpenZWave/python-openzwave
  6. RUN apt-get update && apt-get install --yes make g++ libudev-dev libyaml-dev
  7. RUN useradd --create-home hass && chown hass ~hass
  8. RUN mkdir /config && chown hass /config
  9. VOLUME /config
  10. USER hass
  11. ENV PATH "/home/hass/.local/bin:${PATH}"
  12. RUN pip install --user --no-cache-dir python_openzwave==0.4.9
  13. COPY --chown=hass ./runtime-requirements.txt /tmp
  14. RUN pip install --user --no-cache-dir --requirement /tmp/runtime-requirements.txt \
  15. && rm /tmp/runtime-requirements.txt
  16. RUN pip install --user --no-cache-dir \
  17. homeassistant==0.80.3 \
  18. home-assistant-frontend==20181018.0
  19. CMD ["python", "-m", "homeassistant", "--config", "/config"]