-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (40 loc) · 2.33 KB
/
Copy pathDockerfile
File metadata and controls
47 lines (40 loc) · 2.33 KB
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
47
ARG BUILD_FROM=ghcr.io/hassio-addons/base:21.0.0
# hadolint ignore=DL3006
FROM ${BUILD_FROM}
# Create virtual environment and add to PATH
ARG BUILD_DATE="unknown"
# CR-Skip-PythonBaseCheck
ENV VIRTUAL_ENV=/usr/local/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Pin sslpsk to specific commit for reproducible builds
# hadolint ignore=DL3018,DL3013,DL3042
RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.23/main" > /etc/apk/repositories \
&& echo "http://dl-cdn.alpinelinux.org/alpine/v3.23/community" >> /etc/apk/repositories \
&& apk add --no-cache musl musl-dev \
&& apk upgrade --no-cache --available \
&& apk add --no-cache libssl3 libcrypto3 python3 python3-dev py3-pip bash git iw dnsmasq hostapd screen curl mosquitto haveged net-tools openssl openssl-dev gcc musl-dev linux-headers sudo coreutils grep iproute2 ncurses && \
python3 -m venv $VIRTUAL_ENV && \
pip install --no-cache-dir --upgrade paho-mqtt tornado git+https://github.com/drbild/sslpsk.git@d88123a75786953f82f5e25d6c43d9d9259acb62 pycryptodomex && \
git clone https://github.com/ct-Open-Source/tuya-convert /usr/local/tuya-convert
WORKDIR /usr/local/tuya-convert
RUN git checkout a34b2c91862ed855542e8a32a14a9ab7573c4de9 && \
sed -i 's|ls -m|ls|' /usr/local/tuya-convert/scripts/setup_checks.sh
# Copy data for add-on
COPY start.sh /
RUN chmod a+x /start.sh
CMD [ "/start.sh" ]
# HEALTHCHECK disabled: This addon runs a one-time flash operation and exits.
# Traditional liveness checks don't apply to ephemeral, one-time operations.
HEALTHCHECK NONE
# Labels
LABEL \
org.opencontainers.image.title="tuya-convert BETA" \
org.opencontainers.image.description="Tuya Convert - Flash Tuya devices with open Source software (Beta/Deprecated) (Unsupported)" \
org.opencontainers.image.vendor="FaserF's Home Assistant Apps" \
org.opencontainers.image.authors="FaserF <https://github.com/FaserF>" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.url="https://github.com/FaserF/hassio-addons/tree/master/.unsupported/tuya-convert" \
org.opencontainers.image.source="https://github.com/FaserF/hassio-addons/tree/master/.unsupported/tuya-convert" \
org.opencontainers.image.documentation="https://github.com/FaserF/hassio-addons/blob/master/.unsupported/tuya-convert/README.md" \
org.opencontainers.image.created="${BUILD_DATE}"