wheel/Dockerfile.aarch64
2020-12-27 21:23:52 +01:00

83 lines
1.9 KiB
Docker

FROM roxedus/playground:hass-base as base
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.12 as buildstage
COPY --from=base /tmp /
# environment settings
ENV HOME="/tmp" PIPFLAGS="--find-links=/tmp/wheels --no-cache-dir --use-deprecated=legacy-resolver"
# install packages
# https://github.com/home-assistant/core/blob/11d74124cd06f48c1faf68df9a2ab9034130fafa/azure-pipelines-wheels.yml#L32
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
autoconf \
bluez-deprecated \
bluez-dev \
build-base \
ca-certificates \
cmake \
curl \
cython \
eudev-dev \
eudev-libs \
ffmpeg \
ffmpeg-dev \
g++ \
gcc \
git \
glib-dev \
jq \
libffi-dev \
libjpeg-turbo \
libjpeg-turbo-dev \
libstdc++ \
libxml2-dev \
libxslt \
libxslt-dev \
linux-headers \
make \
openssl \
openssl-dev \
py3-pip \
py3-wheel \
python3 \
python3-dev \
sudo \
unzip
RUN \
mkdir -p \
/build/addons \
/build/core && \
pip3 install --no-cache-dir --upgrade \
pip==20.3 # https://github.com/home-assistant/core/pull/43771
RUN \
echo "**** build wheels for home assistant core ****" && \
pip3 wheel --wheel-dir=/build/core $PIPFLAGS \
-r /tmp/requirements_hass.txt
# https://github.com/home-assistant/core/issues/43934 >> https://github.com/home-assistant/core/pull/36330
RUN \
echo "**** build wheels for home assistant addons ****" && \
pip3 wheel --wheel-dir=/build/addons $PIPFLAGS \
-r /tmp/core/requirements_test_all.txt
RUN \
echo "**** install dependencies for hacs.xyz ****" && \
pip3 wheel --wheel-dir=/build/hacs $PIPFLAGS \
-r /tmp/hacs-source/requirements.txt
RUN \
mkdir -p \
/tmp/repo && \
mv /build/addons/* /tmp/repo/ && \
mv /build/core/* /tmp/repo/ && \
mv /build/hacs/* /tmp/repo/
FROM scratch
COPY --from=buildstage /tmp/repo /