1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-28 15:58:16 +00:00
esphome/docker/Dockerfile

74 lines
1.5 KiB
Docker
Raw Normal View History

2024-09-05 16:09:06 +12:00
FROM ghcr.io/esphome/docker-base:2024.9.0 AS base
RUN git config --system --add safe.directory "*"
COPY requirements.txt /
RUN \
uv pip install --no-cache-dir \
-r /requirements.txt
RUN \
# Change some platformio settings
platformio settings set enable_telemetry No \
&& platformio settings set check_platformio_interval 1000000 \
&& mkdir -p /piolibs
COPY script/platformio_install_deps.py platformio.ini /
RUN /platformio_install_deps.py /platformio.ini --libraries
FROM base AS base-docker
ENV USERNAME="" PASSWORD=""
2020-12-30 10:58:09 +01:00
EXPOSE 6052
2023-11-02 19:19:43 +01:00
HEALTHCHECK --interval=30s --timeout=30s \
CMD curl --fail http://localhost:6052/version -A "HealthCheck" || exit 1
2023-11-02 19:19:43 +01:00
COPY docker/docker_entrypoint.sh /entrypoint.sh
2021-01-27 07:16:59 +01:00
VOLUME /config
WORKDIR /config
ENTRYPOINT ["/entrypoint.sh"]
CMD ["dashboard", "/config"]
FROM base AS base-hassio
# TODO: Install s6-overlay
RUN \
set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
nginx-light=1.22.1-9 \
&& rm -rf \
/tmp/* \
/var/{cache,log}/* \
/var/lib/apt/lists/* \
/usr/src/*
ARG BUILD_VERSION=dev
COPY docker/ha-addon-rootfs/ /
LABEL \
io.hass.name="ESPHome" \
io.hass.description="Manage and program microcontrollers through YAML configuration files" \
io.hass.type="addon" \
io.hass.version="${BUILD_VERSION}"
2024-09-10 08:49:41 +12:00
ARG BUILD_TYPE=docker
FROM base-${BUILD_TYPE} AS final
COPY . /esphome
RUN uv pip install --no-cache-dir -e /esphome
FROM base AS lint
# TODO: