-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (35 loc) · 1.29 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
ARG BUILD_FROM=hassioaddons/base:latest
FROM ${BUILD_FROM}
ENV LANG C.UTF-8
# Copy data for add-on
COPY run.sh /
RUN pip install pyserial \
\
&& curl -J -L -o /tcp_serial_redirect.py \
"https://raw.githubusercontent.com/altersis/pyserial/master/examples/tcp_serial_redirect.py"
# Build arguments
ARG BUILD_ARCH
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION
# Set our add-on persistent data directory.
WORKDIR /
RUN chmod a+x /run.sh
CMD [ "/run.sh" ]
# Labels
LABEL \
io.hass.name="Serial 2 TCP Gateway" \
io.hass.description="gateway to connect your RS232 devices to the network" \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Gerardo Castillo <[email protected]>" \
org.label-schema.description="connect your rs232 devices 2 TCP" \
org.label-schema.build-date=${BUILD_DATE} \
org.label-schema.name="Ser 2 TCP" \
org.label-schema.schema-version="dev" \
org.label-schema.url="https://community.home-assistant.io/" \
org.label-schema.usage="https://github.com/hassio-addons/addon-nut/tree/master/README.md" \
org.label-schema.vcs-ref=${BUILD_REF} \
org.label-schema.vcs-url="https://github.com/hassio-addons/addon-nut" \
org.label-schema.vendor="Home Assistant Community Addons"