Try fix docker build

This commit is contained in:
Otto Winter 2018-09-25 13:26:01 +02:00
parent bc8354bad5
commit 5cd82d7c25
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
6 changed files with 24 additions and 16 deletions

View File

@ -68,7 +68,7 @@ test:
"${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}"
- docker push "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}"
- docker push "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:dev"
retry: 1
retry: 2
# Generic deploy template
.deploy: &deploy

View File

@ -19,8 +19,8 @@ RUN platformio settings set enable_telemetry No && \
platformio run -e espressif32 -e espressif8266; exit 0
COPY . .
RUN pip install -e . && \
pip install tzlocal
RUN pip install --no-cache-dir -e . && \
pip install --no-cache-dir tzlocal
WORKDIR /config
ENTRYPOINT ["esphomeyaml"]

View File

@ -1,21 +1,21 @@
# Dockerfile for aarch64 version of HassIO add-on
FROM homeassistant/aarch64-base:latest
FROM arm64v8/ubuntu:bionic
RUN apk add --no-cache \
python2 \
py2-pip \
RUN apt-get update && apt-get install -y --no-install-recommends \
python \
python-pip \
python-setuptools \
python-pil \
git \
openssh \
libc6-compat \
&& \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*rm -rf /var/lib/apt/lists/* /tmp/* && \
pip install --no-cache-dir --no-binary :all: platformio && \
platformio settings set enable_telemetry No
COPY docker/platformio-esp8266.ini /pio/platformio.ini
COPY docker/platformio.ini /pio/platformio.ini
RUN platformio run -d /pio; rm -rf /pio
COPY . .
RUN pip install --no-cache-dir --no-binary :all: -e . && \
pip install --no-cache-dir --no-binary :all: pillow tzlocal
pip install --no-cache-dir --no-binary :all: tzlocal
CMD ["esphomeyaml", "/config/esphomeyaml", "dashboard"]

View File

@ -3,8 +3,10 @@ FROM homeassistant/armhf-base:latest
RUN apk add --no-cache \
python2 \
python2-dev \
py2-pip \
git \
gcc \
openssh \
libc6-compat \
jpeg-dev \
@ -13,6 +15,8 @@ RUN apk add --no-cache \
lcms2-dev \
openjpeg-dev \
tiff-dev \
libc-dev \
linux-headers \
&& \
pip install --no-cache-dir --no-binary :all: platformio && \
platformio settings set enable_telemetry No
@ -22,6 +26,6 @@ RUN platformio run -d /pio; rm -rf /pio
COPY . .
RUN pip install --no-cache-dir --no-binary :all: -e . && \
pip install --no-cache-dir pilow tzlocal
pip install --no-cache-dir pillow tzlocal
CMD ["esphomeyaml", "/config/esphomeyaml", "dashboard"]

View File

@ -21,8 +21,10 @@ RUN /bin/bash -c "if [[ '$BUILD_FROM' = *\"ubuntu\"* ]]; then \
else \
apk add --no-cache \
python2 \
python2-dev \
py2-pip \
git \
gcc \
openssh \
libc6-compat \
jpeg-dev \
@ -30,7 +32,9 @@ RUN /bin/bash -c "if [[ '$BUILD_FROM' = *\"ubuntu\"* ]]; then \
freetype-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev; \
tiff-dev \
libc-dev \
linux-headers; \
fi" && \
pip install --no-cache-dir platformio && \
platformio settings set enable_telemetry No
@ -50,6 +54,6 @@ RUN /bin/bash -c "if [[ '$BUILD_FROM' = *\"ubuntu\"* ]]; then \
# Install latest esphomeyaml from git
RUN pip install --no-cache-dir \
git+git://github.com/OttoWinter/esphomeyaml.git && \
pip install pillow tzlocal
pip install --no-cache-dir pillow tzlocal
CMD ["esphomeyaml", "/config/esphomeyaml", "dashboard"]

View File

@ -1,7 +1,7 @@
{
"squash": false,
"build_from": {
"aarch64": "homeassistant/aarch64-base:latest",
"aarch64": "arm64v8/ubuntu:bionic",
"amd64": "ubuntu:bionic",
"armhf": "homeassistant/armhf-base:latest",
"i386": "i386/ubuntu:bionic"