23 lines
452 B
Docker
Executable File
23 lines
452 B
Docker
Executable File
ARG BUILD_FROM
|
|
FROM $BUILD_FROM
|
|
|
|
# Install requirements for add-on
|
|
RUN apk update && apk add --no-cache python3 py-pip
|
|
|
|
# Prepare venv
|
|
RUN python3 -m venv /opt/venv
|
|
|
|
RUN source /opt/venv/bin/activate && \
|
|
python3 -m pip install websockets requests beautifulsoup4
|
|
|
|
WORKDIR /srv
|
|
|
|
# Copy data for add-on
|
|
COPY sync_ha_fb.py /srv
|
|
COPY fritzbox.py /srv
|
|
COPY homeassistant.py /srv
|
|
COPY device.py /srv
|
|
COPY run.sh /
|
|
RUN chmod a+x /run.sh
|
|
|
|
CMD [ "/run.sh" ] |