homeassistant-addons/epaper-station/Dockerfile

22 lines
935 B
Text
Raw Permalink Normal View History

2023-02-06 21:17:01 +00:00
ARG BUILD_FROM=ghcr.io/hassio-addons/base-python/amd64:9.0.1
FROM ${BUILD_FROM}
2023-02-10 15:59:29 +00:00
RUN apk add --no-cache nginx
2023-02-06 22:23:51 +00:00
2023-02-10 15:59:29 +00:00
ADD "https://github.com/jhbruhn/ZBS_Flasher/archive/refs/heads/case_insensitive_img.tar.gz" /src.tar.gz
2023-02-06 21:17:01 +00:00
RUN mkdir /src && tar xvfz /src.tar.gz -C /src --strip-components=1
RUN mv /src/CC2531_station/epaper_station_websocket/ /app
WORKDIR /app
2023-02-06 21:23:00 +00:00
RUN ls /src && pip install -r requirements.txt
2023-02-06 22:23:51 +00:00
RUN mkdir /public && cp /app/online_viewer.html /public/index.html && cp /app/no_img.jpg /public/
2023-02-06 22:45:26 +00:00
RUN sed -i 's/`ws:\/\/localhost:8000\/ws`/window.location.href.replace("http", "ws") + "\/ws\/"/g' /public/index.html
2023-02-09 18:22:54 +00:00
RUN sed -i "s/localhost/127.0.0.1/g" /app/websock.py
2023-02-06 21:18:24 +00:00
ADD rootfs /
# Corrects permissions for s6 v3
RUN if [ -d /etc/cont-init.d ]; then chmod -R 755 /etc/cont-init.d; fi && \
if [ -d /etc/services.d ]; then chmod -R 755 /etc/services.d; fi && \
if [ -f /entrypoint.sh ]; then chmod 755 /entrypoint.sh; fi