HAOS Add-on: Dockerfile Fix - COPY src/ direkt, pip3 inline
- COPY src/ /app/ statt zweistufig (vermeidet src/requirements.txt not found) - pip3 inline statt requirements.txt (kein separater COPY-Schritt nötig) - ARG BUILD_FROM mit amd64 Default (build.yaml Deprecation umgangen) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
ARG BUILD_FROM
|
||||
ARG BUILD_FROM=ghcr.io/home-assistant/amd64-base-python:3.11-alpine3.18
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY src/requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY src/ /app/
|
||||
|
||||
COPY src/ .
|
||||
RUN pip3 install --no-cache-dir \
|
||||
pymodbus==3.6.9 \
|
||||
paho-mqtt==1.6.1 \
|
||||
flask==3.0.3
|
||||
|
||||
COPY run.sh /run.sh
|
||||
RUN chmod +x /run.sh
|
||||
RUN chmod a+x /run.sh
|
||||
|
||||
CMD ["/run.sh"]
|
||||
|
||||
Reference in New Issue
Block a user