Источники
Установка средствами Docker-compose
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
---
services:
apcupsd:
image: gregewing/apcupsd:latest
container_name: apcupsd
privileged: true
environment:
- TZ=Europe/Moscow
volumes:
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
devices:
- /dev/usb/hiddev0
ports:
- 3551:3551
restart: unless-stopped
|
1
2
|
docker compose pull
docker compose up -d
|
CLI Установка
Basic
1
2
3
4
5
6
7
8
9
|
docker run -d \
--name="apcupsd" \
--privileged \
--device=/dev/usb/hiddev0 \
-p 3551:3551 \
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
-e TZ=Europe/Moscow \
--restart unless-stopped \
gregewing/apcupsd:latest
|
С авто-отключением
1
2
3
4
5
6
7
8
9
|
docker run -d \
--name="apcupsd" \
--privileged \
--device=/dev/usb/hiddev0 \
-p 3551:3551 \
-v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket \
-e TZ=Europe/Moscow \
--restart unless-stopped \
gregewing/apcupsd:latest
|
Удаление
1
2
3
|
docker stop apcupsd; \
docker rm apcupsd; \
docker rmi gregewing/apcupsd
|
Настройка
Модуль для NodeRed – node-red-contrib-apcaccess