2019-04-24 17:08:05 +02:00
|
|
|
ARG BUILD_FROM
|
2018-11-03 16:24:26 +01:00
|
|
|
FROM ${BUILD_FROM}
|
|
|
|
|
2020-07-15 22:13:14 +02:00
|
|
|
# First install requirements to leverage caching when requirements don't change
|
2021-03-20 18:43:31 +01:00
|
|
|
COPY requirements.txt docker/platformio_install_deps.py platformio.ini /
|
|
|
|
RUN \
|
|
|
|
pip3 install --no-cache-dir -r /requirements.txt \
|
|
|
|
&& /platformio_install_deps.py /platformio.ini
|
2020-07-15 22:13:14 +02:00
|
|
|
|
2019-02-13 16:54:02 +01:00
|
|
|
# Copy root filesystem
|
|
|
|
COPY docker/rootfs/ /
|
|
|
|
|
2020-07-15 22:13:14 +02:00
|
|
|
# Then copy esphome and install
|
|
|
|
COPY . /opt/esphome/
|
2019-10-19 16:31:03 +02:00
|
|
|
RUN pip3 install --no-cache-dir -e /opt/esphome
|
2018-11-03 16:24:26 +01:00
|
|
|
|
2019-02-13 16:54:02 +01:00
|
|
|
# Build arguments
|
|
|
|
ARG BUILD_VERSION=dev
|
2018-11-03 16:24:26 +01:00
|
|
|
|
|
|
|
# Labels
|
|
|
|
LABEL \
|
2019-02-13 16:54:02 +01:00
|
|
|
io.hass.name="ESPHome" \
|
2018-12-05 21:22:06 +01:00
|
|
|
io.hass.description="Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files" \
|
2018-11-03 16:24:26 +01:00
|
|
|
io.hass.type="addon" \
|
2019-02-13 16:54:02 +01:00
|
|
|
io.hass.version=${BUILD_VERSION}
|