From e069687477b370137d7e7cb8ef00121a475e2605 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 15 Jul 2020 22:13:14 +0200 Subject: [PATCH] Fix Dockerfile.hassio and improve caching Previous one was broken, see also https://github.com/esphome/esphome/runs/874896962 --- docker/Dockerfile.hassio | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.hassio b/docker/Dockerfile.hassio index e5c9625680..eb7ef23001 100644 --- a/docker/Dockerfile.hassio +++ b/docker/Dockerfile.hassio @@ -1,11 +1,15 @@ ARG BUILD_FROM FROM ${BUILD_FROM} +# First install requirements to leverage caching when requirements don't change +COPY requirements.txt / +RUN pip3 install --no-cache-dir -r /requirements.txt + # Copy root filesystem COPY docker/rootfs/ / -COPY setup.py setup.cfg MANIFEST.in /opt/esphome/ -COPY esphome /opt/esphome/esphome +# Then copy esphome and install +COPY . /opt/esphome/ RUN pip3 install --no-cache-dir -e /opt/esphome # Build arguments