mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
Use more layer caching for esphome/esphome Dockerfile (#1150)
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
ARG BUILD_FROM=esphome/esphome-base-amd64:2.3.1
|
||||
ARG BUILD_FROM=esphome/esphome-base-amd64:2.3.3
|
||||
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 .
|
||||
|
||||
ENV USERNAME=""
|
||||
ENV PASSWORD=""
|
||||
# Settings for dashboard
|
||||
ENV USERNAME="" PASSWORD=""
|
||||
|
||||
# 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"]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FROM esphome/esphome-base-amd64:2.3.1
|
||||
FROM esphome/esphome-base-amd64:2.3.3
|
||||
|
||||
COPY . .
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FROM esphome/esphome-lint-base:2.3.1
|
||||
FROM esphome/esphome-lint-base:2.3.3
|
||||
|
||||
COPY requirements.txt requirements_test.txt /
|
||||
RUN pip3 install --no-cache-dir -r /requirements.txt -r /requirements_test.txt
|
||||
|
Reference in New Issue
Block a user