mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 21:44:55 +01:00
24 lines
710 B
Docker
24 lines
710 B
Docker
ARG BUILD_FROM=esphome/esphome-base-amd64:2.6.0
|
|
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
|
|
|
|
# Then copy esphome and install
|
|
COPY . .
|
|
RUN pip3 install --no-cache-dir -e .
|
|
|
|
# Settings for dashboard
|
|
ENV USERNAME="" PASSWORD=""
|
|
|
|
# Expose the dashboard to Docker
|
|
EXPOSE 6052
|
|
|
|
# The directory the user should mount their configuration files to
|
|
WORKDIR /config
|
|
# Set entrypoint to esphome so that the user doesn't have to type 'esphome'
|
|
# in every docker command twice
|
|
ENTRYPOINT ["esphome"]
|
|
# When no arguments given, start the dashboard in the workdir
|
|
CMD ["/config", "dashboard"]
|