FROM homeassistant/amd64-base:latest # Install necessary packages RUN apk add --no-cache \ python3 \ python3-dev \ build-base \ git # Set working directory WORKDIR /app # Copy addon files COPY . /app # Install Python dependencies RUN pip3 install --no-cache-dir \ homeassistant \ aiohttp \ aiohttp_cors # Create web directory if it doesn't exist RUN mkdir -p /app/web # Create startup script RUN echo "#!/bin/sh\npython3 /app/main.py" > /startup.sh && chmod +x /startup.sh # Expose the web interface port EXPOSE 8099 # Start the addon CMD ["/startup.sh"]