forked from seblucas/alpine-homeassistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 1.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM alpine:3.9
LABEL maintainer="Sebastien Lucas <[email protected]>"
LABEL Description="Home Assistant"
ARG TIMEZONE=Europe/Paris
ARG UID=1000
ARG GUID=1000
ARG MAKEFLAGS=-j4
ARG VERSION=0.92.2
ARG PLUGINS="frontend|pyotp|PyQRCode|sqlalchemy|distro|http|nmap|weather|uptimerobot|rxv|wakeonlan|websocket|paho-mqtt|samsungctl[websocket]|pychromecast|aiohttp_cors|jsonrpc-websocket|jsonrpc-async"
ADD "https://raw.githubusercontent.com/home-assistant/home-assistant/${VERSION}/requirements_all.txt" /tmp
RUN apk add --no-cache git python3 ca-certificates libffi-dev libressl-dev nmap iputils && \
addgroup -g ${GUID} hass && \
adduser -h /data -D -G hass -s /bin/sh -u ${UID} hass && \
pip3 install --upgrade --no-cache-dir pip==19.0.3 && \
apk add --no-cache --virtual=build-dependencies build-base linux-headers python3-dev tzdata && \
cp "/usr/share/zoneinfo/${TIMEZONE}" /etc/localtime && echo "${TIMEZONE}" > /etc/timezone && \
sed '/^$/q' /tmp/requirements_all.txt > /tmp/requirements_core.txt && \
sed '1,/^$/d' /tmp/requirements_all.txt > /requirements_plugins.txt && \
egrep -e "${PLUGINS}" /requirements_plugins.txt | grep -v '#' > /tmp/requirements_plugins_filtered.txt && \
pip3 install --no-cache-dir -r /tmp/requirements_core.txt && \
pip3 install --no-cache-dir -r /tmp/requirements_plugins_filtered.txt && \
pip3 install --no-cache-dir homeassistant=="${VERSION}" && \
apk del build-dependencies && \
rm -rf /tmp/* /var/tmp/* /var/cache/apk/*
EXPOSE 8123
ENTRYPOINT ["hass", "--open-ui", "--config=/data"]