wheel/Dockerfile.aarch64

83 lines
1.9 KiB
Docker
Raw Normal View History

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