This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
46 lines (40 loc) · 1.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ARG BUILD_FROM=homeassistant/amd64-base-python:3.7
FROM ${BUILD_FROM}
# Install python evdev
RUN apk add --no-cache \
libevdev-dev \
linux-headers \
build-base \
&& pip3 install --no-cache-dir evdev \
&& apk del --no-cache --purge \
linux-headers \
build-base
# Copy install other python requirements from file
COPY requirements.txt /tmp/
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt
# Copy root filesystem
COPY run.py /
# Script to run after startup
CMD ["/run.py"]
# Build arguments
ARG BUILD_ARCH
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION
# Labels
LABEL \
io.hass.name="USB HID Reader" \
io.hass.description="Read Tokens from USB HID and publish them to a MQTT topic" \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Gregor Godbersen <[email protected]>" \
org.label-schema.description="Read Tokens from USB HID and publish them to a MQTT topic" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="USB HID Reader" \
org.label-schema.schema-version="1.0" \
org.label-schema.url="https://github.com/gregod/addon-usbhid-to-mqtt/tree/master/usbhid-to-mqtt" \
org.label-schema.usage="https://github.com/gregod/addon-usbhid-to-mqtt/blob/master/usbhid-to-mqtt/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/gregod/addon-usbhid-to-mqtt/" \
org.label-schema.vendor="Gregor Godbersen"