Last active
April 2, 2019 10:43
-
-
Save pszafer/6362eca7383bc8d4d20df8469e77c552 to your computer and use it in GitHub Desktop.
Dockerfile HA + Bosch thermostat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.9 | |
EXPOSE 8123:8555 | |
RUN apk add --no-cache git python3 py3-virtualenv openssh python3-dev gcc musl-dev libffi-dev openssl-dev | |
WORKDIR /usr/src/app | |
RUN git clone -b bosch_thermostat --single-branch https://github.com/pszafer/home-assistant | |
RUN git clone -b upnp_buderus_discovery https://github.com/moustic999/netdisco | |
RUN git clone https://github.com/moustic999/bosch-thermostat-http-client-python | |
RUN python3 -m venv home-assistant/ | |
RUN ls -la /usr/src/app/home-assistant/lib/ | |
RUN ln -s /usr/src/app/bosch-thermostat-http-client-python/bosch_thermostat_http home-assistant/lib/python3.6/site-packages/bosch_thermostat_http | |
RUN ln -s /usr/src/app/bosch-thermostat-http-client-python/bosch_thermostat_http home-assistant/lib/python3.6/site-packages/bosch_thermostat_http | |
RUN ln -s /usr/src/app/netdisco/netdisco home-assistant/lib/python3.6/site-packages/netdisco | |
RUN source home-assistant/bin/activate && pip install --upgrade pip && home-assistant/script/setup && pip install pyaes | |
RUN mkdir -p /root/.homeassistant | |
RUN echo "homeassistant:" >> /root/.homeassistant/configuration.yaml | |
RUN echo " name: Home" >> /root/.homeassistant/configuration.yaml | |
RUN echo " time_zone: UTC" >> /root/.homeassistant/configuration.yaml | |
RUN echo "config:" >> /root/.homeassistant/configuration.yaml | |
RUN echo "discovery:" >> /root/.homeassistant/configuration.yaml | |
RUN echo "frontend:" >> /root/.homeassistant/configuration.yaml | |
RUN echo "bosch:" >> /root/.homeassistant/configuration.yaml | |
RUN echo "#!/bin/sh" >> run_hass.sh && echo "source home-assistant/bin/activate" >> run_hass.sh && echo "hass" >> run_hass.sh | |
RUN chmod +x run_hass.sh | |
RUN ifconfig | |
CMD [ "/usr/src/app/run_hass.sh" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment