From fa91041478f1bbc30ff5ee4b14a3dab39d8331aa Mon Sep 17 00:00:00 2001 From: Max Winterstein Date: Tue, 5 Jan 2021 17:11:48 +0100 Subject: [PATCH] Use dockerhub hosted images as base --- eufy-ha-mqtt-bridge/CHANGELOG.md | 3 +++ eufy-ha-mqtt-bridge/Dockerfile | 22 ++-------------------- eufy-ha-mqtt-bridge/Dockerfile-real | 21 +++++++++++++++++++++ eufy-ha-mqtt-bridge/README.md | 4 +++- eufy-ha-mqtt-bridge/config.json | 9 ++++----- 5 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 eufy-ha-mqtt-bridge/Dockerfile-real diff --git a/eufy-ha-mqtt-bridge/CHANGELOG.md b/eufy-ha-mqtt-bridge/CHANGELOG.md index 4614d27..48b001b 100644 --- a/eufy-ha-mqtt-bridge/CHANGELOG.md +++ b/eufy-ha-mqtt-bridge/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [0.8.0] - 2021-01-05 +- Moved to dockerhub located images + ## [0.7.0] - 2021-01-02 - Updated logo diff --git a/eufy-ha-mqtt-bridge/Dockerfile b/eufy-ha-mqtt-bridge/Dockerfile index 9be751a..5155270 100644 --- a/eufy-ha-mqtt-bridge/Dockerfile +++ b/eufy-ha-mqtt-bridge/Dockerfile @@ -1,21 +1,3 @@ -FROM hassioaddons/debian-base -ENV LANG C.UTF-8 +# sneaky trick to get around the requirement of {arch}-variabe based docker repositories -# install node and build tools (needed by node-pre-gy) -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt install -y nodejs g++ make python - -# Calls for a random number to break the cache -# (https://stackoverflow.com/questions/35134713/disable-cache-for-specific-run-commands/58801213#58801213) -ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache - -# add source and unpack -ADD "https://github.com/matijse/eufy-ha-mqtt-bridge/tarball/main" /src.tar.gz -RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1 - -# install all (and json2yaml for Cofiguration parsing) -WORKDIR /app -RUN npm install && npm install -g json2yaml - -COPY run.sh / -RUN chmod a+x /run.sh -CMD [ "/run.sh" ] +FROM maxwinterstein/homeassistant-addon-eufy-ha-mqtt-bridge:latest diff --git a/eufy-ha-mqtt-bridge/Dockerfile-real b/eufy-ha-mqtt-bridge/Dockerfile-real new file mode 100644 index 0000000..69ec454 --- /dev/null +++ b/eufy-ha-mqtt-bridge/Dockerfile-real @@ -0,0 +1,21 @@ +FROM hassioaddons/debian-base +ENV LANG C.UTF-8 + +# install node and build tools (needed by node-pre-gy) +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt install -y nodejs g++ make python + +# Calls for a random number to bust the cache +# (https://stackoverflow.com/questions/35134713/disable-cache-for-specific-run-commands/58801213#58801213) +ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache + +# add source and unpack +ADD "https://github.com/matijse/eufy-ha-mqtt-bridge/tarball/main" /src.tar.gz +RUN mkdir /app && tar xvfz /src.tar.gz -C /app --strip-components=1 + +# install all (and json2yaml for cofiguration parsing) +WORKDIR /app +RUN npm install && npm install -g json2yaml + +COPY run.sh / +RUN chmod a+x /run.sh +CMD [ "/run.sh" ] diff --git a/eufy-ha-mqtt-bridge/README.md b/eufy-ha-mqtt-bridge/README.md index aea503c..67b6b01 100644 --- a/eufy-ha-mqtt-bridge/README.md +++ b/eufy-ha-mqtt-bridge/README.md @@ -1,10 +1,12 @@ # Home Assistant Add-on: Eufy Home Assistant MQTT Bridge +## Based on https://github.com/matijse/eufy-ha-mqtt-bridge/ --- ## 🚨 This is some experimental release! 🚨 --- -**As this add-on will be build locally it might take some time (8min on my rpi4). This will be solved by pre-build images soon.** +**The underlaying docker image will be build every night until there is some kind of versioning available.** +**If a feature was released at eufy-ha-mqtt-bridge, it might be available as recently as the next day.** Quick wrapp around https://github.com/matijse/eufy-ha-mqtt-bridge. diff --git a/eufy-ha-mqtt-bridge/config.json b/eufy-ha-mqtt-bridge/config.json index 6417058..096a48a 100644 --- a/eufy-ha-mqtt-bridge/config.json +++ b/eufy-ha-mqtt-bridge/config.json @@ -1,14 +1,13 @@ { "name": "Eufy Home Assistant MQTT Bridge", - "version": "0.6.0", + "version": "0.7.0", "slug": "eufy-ha-mqtt-bridge", "description": "Publish events as MQTT messages", "arch": [ "armhf", "armv7", "aarch64", - "amd64", - "i386" + "amd64" ], "startup": "application", "boot": "auto", @@ -41,6 +40,6 @@ "map": [ "share:rw" ], - "hassio_role": "default", - "hassio_api": true + "hassio_role": "default", + "hassio_api": true } \ No newline at end of file