diff --git a/fritz_temp_sync/Dockerfile b/fritz_temp_sync/Dockerfile index 9d58d8c..0edecfc 100755 --- a/fritz_temp_sync/Dockerfile +++ b/fritz_temp_sync/Dockerfile @@ -3,7 +3,12 @@ FROM $BUILD_FROM # Install requirements for add-on RUN apk update && apk add --no-cache python3 py-pip -RUN python3 -m pip install websockets requests beautifulsoup4 + +# Prepare venv +RUN python3 -m venv venv + +RUN source ./venv/bin/activate && \ + python3 -m pip install websockets requests beautifulsoup4 WORKDIR /data diff --git a/fritz_temp_sync/run.sh b/fritz_temp_sync/run.sh index c40f1aa..5a76f1c 100755 --- a/fritz_temp_sync/run.sh +++ b/fritz_temp_sync/run.sh @@ -1,3 +1,4 @@ #!/usr/bin/with-contenv bashio +source ./venv/bin/activate python3 /srv/sync_ha_fb.py /data/options.json \ No newline at end of file