From 0bc6b18a6499a42e737b1c85c003b9205c688285 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 14 Dec 2020 16:42:08 +0100 Subject: [PATCH] Update Dockerfile --- transmission/Dockerfile | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/transmission/Dockerfile b/transmission/Dockerfile index db7056e8e..d80f08c81 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -4,29 +4,6 @@ FROM $BUILD_FROM # Copy root filesystem COPY rootfs / -# Small hack needed for ingress support -# -# Transmission always uses "transmission" as a subdirectory in the URL, so the web interface can for instance be found at: -# -# http:///transmission/web/ -# -# The same goes for the RPC API, which is exposed under /transmission/rpc. When using ingress, this is not the case however -# and "transmission" directory is not part of the URL. So transmission is basically served under the root (/), e.g.: -# -# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/ -# -# As the web UI uses a relative path when resolving the RPC endpoint, it basically becomes: -# -# http://10.0.10.110:8123/api/hassio_ingress/rQEi5X4zJFTmZ82ghplDjsx2AoK3r2lqx0zZHHjZ69Q/../rpc -# -# which obviously is: -# -# http://10.0.10.110:8123/api/hassio_ingress -# -# This will not work. The sed statement below changes the way the RPC endpoint is determined by keeping the regular endpoint -# when accessing transmission as usual, but stripping the relative part when using ingress. -RUN sed -i 's|'"'"'\.\./rpc'"'"'|window.location.pathname.endsWith("/web/") ? "../rpc" : "rpc"|' /usr/share/transmission/web/javascript/remote.js - # MOFIFY DATA PATH RUN sed -i "s|config|share/transmission|g" /etc/services.d/transmission/run