From 2d617444b65888cd86a5d4a3421f7331a77de9de Mon Sep 17 00:00:00 2001 From: Yabune Solution Date: Wed, 17 Jan 2024 22:59:46 +0100 Subject: [PATCH 1/3] Uplift NUT version --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3dd796..5eeb3bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ -FROM alpine:3.12 +FROM alpine:3.19.0 -LABEL maintainer="docker@upshift.fr" - -ENV NUT_VERSION 2.7.4 +ENV NUT_VERSION 2.8.1 ENV UPS_NAME="ups" ENV UPS_DESC="UPS" @@ -27,7 +25,7 @@ RUN set -ex; \ ; \ # download and extract cd /tmp; \ - wget http://www.networkupstools.org/source/2.7/nut-$NUT_VERSION.tar.gz; \ + wget http://www.networkupstools.org/source/2.8/nut-$NUT_VERSION.tar.gz; \ tar xfz nut-$NUT_VERSION.tar.gz; \ cd nut-$NUT_VERSION \ ; \ From 5728f348d73802836790ea6b77844a62e0f4bcd7 Mon Sep 17 00:00:00 2001 From: Tobias Roeder Date: Tue, 20 Aug 2024 09:53:14 -0400 Subject: [PATCH 2/3] [Updated] to latest version, [Improved] watch uspc client as entry point --- Dockerfile | 23 +++++++++++++++-------- src/docker-entrypoint | 9 +++++++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5eeb3bb..3cb4e98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,19 +16,26 @@ RUN set -ex; \ # run dependencies apk add --no-cache \ openssh-client \ - libusb-compat \ + libusb-dev \ + git \ + python3 \ + perl \ + autoconf \ + libtool \ + automake \ + libltdl \ ; \ # build dependencies apk add --no-cache --virtual .build-deps \ - libusb-compat-dev \ + libusb-dev \ build-base \ ; \ # download and extract cd /tmp; \ - wget http://www.networkupstools.org/source/2.8/nut-$NUT_VERSION.tar.gz; \ - tar xfz nut-$NUT_VERSION.tar.gz; \ - cd nut-$NUT_VERSION \ - ; \ + git clone https://github.com/networkupstools/nut.git; \ + cd nut; \ + ./autogen.sh; \ + #; \ # build ./configure \ --prefix=/usr \ @@ -42,7 +49,7 @@ RUN set -ex; \ --with-drvpath=/usr/share/nut \ --with-statepath=/var/run/nut \ --with-user=nut \ - --with-group=nut \ + --with-group=nut\ ; \ # install make install \ @@ -54,7 +61,7 @@ RUN set -ex; \ install -d -m 750 -o nut -g nut /var/run/nut \ ; \ # cleanup - rm -rf /tmp/nut-$NUT_VERSION.tar.gz /tmp/nut-$NUT_VERSION; \ + rm -rf /tmp/nut; \ apk del .build-deps COPY src/docker-entrypoint /usr/local/bin/ diff --git a/src/docker-entrypoint b/src/docker-entrypoint index 2365511..2aa9972 100755 --- a/src/docker-entrypoint +++ b/src/docker-entrypoint @@ -1,4 +1,4 @@ -#!/bin/sh -ex +#!/bin/sh -x if [ -z "$API_PASSWORD" ] then @@ -15,6 +15,9 @@ cat >/etc/nut/ups.conf </etc/nut/upsd.conf < Date: Tue, 20 Aug 2024 14:54:47 -0400 Subject: [PATCH 3/3] [Fixed] pollonly for liebert --- Dockerfile | 2 -- src/docker-entrypoint | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3cb4e98..cc150bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM alpine:3.19.0 -ENV NUT_VERSION 2.8.1 - ENV UPS_NAME="ups" ENV UPS_DESC="UPS" ENV UPS_DRIVER="usbhid-ups" diff --git a/src/docker-entrypoint b/src/docker-entrypoint index 2aa9972..117b8c3 100755 --- a/src/docker-entrypoint +++ b/src/docker-entrypoint @@ -18,10 +18,12 @@ cat >/etc/nut/ups.conf </etc/nut/upsd.conf </etc/nut/upsd.users </etc/nut/upsmon.conf <