Kameleon83 Posted September 7, 2021 Share Posted September 7, 2021 (edited) Bonjour à toutes et à tous, J’ai réalisé une petite application qui permet de lister les Conteneurs docker qui ont un lien WebUI. Variables d’environnements : - CIRCLE : - yes : le fond d’écran aura des cercles de couleurs - vide : pas de cercles de couleurs - HOST : (ex : unraid.duckdns.org) - cette variable permet de mettre un DNS / DynDNS. Cela vous permet de vous connecter sur cette page en dehors de votre réseau local. - vide : l’adresse pour y accéder restera l’adresse locale - UNRAID_IP : - si vous avez ajoutez un HOST, toutes vos adresses IP auront votre DNS / DynDNS même les conteneurs ayant une autre adresse IP. Entrez votre adresse IP locale ainsi les conteneurs différents garderont leur adresse différente sans que celle-ci soit remplacé. - vide : l’adresse pour y accéder restera l’adresse locale - TITLE : - Celle-ci vous permet de modifier le titre de la page HTML dans l’onglet de votre navigateur. - vide : Docker WebUI - PORT : - Cette Variable permet de changer le port interne de l'application. Par défaut, c'est 8080. - ⚠️ Si vous changer le port 8080 par défaut, il ne faut pas oublier de le changer dans la variable WebUI => Container Port. Des petites choses essentielles au bon fonctionnement de cette application : - Ne changer pas le nom de l’application (Docker-WebUI). J’ai omis la liste avec ce nom. Si vous le changer alors vous verrez celle-ci listée. - container : /data, host : /var/local/emhttp/plugins/dynamix.docker.manager Ajoutez un dossier partagé pour la configuration. A l'intérieur, un fichier (subdomains.yml) stockera les sous-domaines que vous modifierez dans l'application. - conteneur : /config, hôte : /mnt/user/docker/Docker-WebUI/config Amusez-vous. ----------------------- Mise à jour --------------------------- 01 / 08 / 2022 - Ajout de l’installation de l’application (service worker). Condition à respecter => HTTPS - Ajout d’un choix d’URL par conteneur : LAN ou WAN - Possibilité de mettre un sous-domaine par conteneur. 05 / 06 / 2022 - Correction du problème d'affichage du favicon. 07 / 05 / 2022 - Ajout de la Variable PORT pour changer le port interne de l'application. ⚠️ Si vous changer le port 8080 par défaut, il ne faut pas oublier de le changer dans la variable WebUI => Container Port. 16 / 01 / 2022 - Ajoutez TITLE pour modifier le titre de votre page dans l'onglet du navigateur. 09 / 01 / 2022 - Bonne Année - Ajouter UNRAID_IP : Ceci déterminera si un conteneur a sa propre IP ou non. Ne le remplissez que si HOST est rempli. 13 / 11 / 2021 - Ajout de zoom / dézoome - Ajout d’un filtre - Ajout d’une variable d’environnement HOST pour mettre votre HOSTNAME ou dns (si les ports sont ouverts) 07 / 11 / 2021 - Correction du problème avec paramètre d'URL. http://IP:PORT/vnc.html?resize=remote&host=192.168.0.4&port=6080&autoconnect=1 to http://IP:PORT/vnc.html?resize=remote&host=192.168.0.4&port=6080&autoconnect=1 03 / 11 / 2021: - Ne changer pas le nom de l’application (Docker-WebUI). J’ai omis la liste avec ce nom. Si vous le changer alors vous verrez celle-ci listée. - Si vous êtes en version 6.10-rc2 (ou plus), vous pouvez changer le nom du container grâce à l'ajout d'une variable d'environnement dans chaque container (HOST_CONTAINERNAME). Merci à @Meles Meles. 31 / 10 / 2021: - Ajouter la variable CIRCLE #Cette variable vous permet de définir ou de supprimer les cercles de couleur. ------------------------------------------------------------- English ----------------------------------------------------------------------------- Hello to all of you, I made a small application that lists the docker containers that have a WebUI link. Environment variables: - CIRCLE: - yes : the background will have colored circles - empty : no colored circles - HOST : (ex : unraid.duckdns.org) - this variable allows you to put a DNS / DynDNS. This allows you to connect to this page outside your local network. - empty : the address to access it will remain the local address - UNRAID_IP : - if you have added a HOST, all your IP addresses will have your DNS / DynDNS even containers with another IP address. Enter your local IP address so different containers will keep their different address without it being replaced. - empty : the address to access it will remain the local address - TITLE : - This one allows you to change the title of the HTML page in the tab of your browser. - empty: Docker WebUI A few things that are essential for this application to work properly: - Do not change the name of the application (Docker-WebUI). I have omitted the list with this name. If you change it then you will see it listed. - container: /data, host: /var/local/emhttp/plugins/dynamix.docker.manager Add a folder share for configuration. Inside, a file (subdomains.yml) will store the subdomains you will change in the application. - container: /config, host: /mnt/user/docker/Docker-WebUI/config Have fun. ----------------------- Update --------------------------- 01 / 08 / 2022 - Adding the installation of the application (service worker). Condition to respect => HTTPS - Add a choice of URL per container: LAN or WAN - Possibility to put a sub-domain per container. 05 / 06 / 2022 - Fixed favicon display issue. 07 / 05 / 2022 - Add Variable PORT to change the internal port of the application. ⚠️ If you change the default port 8080, don't forget to change it in the WebUI => Container Port variable. 16 / 01 / 2022 - Add TITLE to change the title of your page in the browser tab. 09 / 01 / 2022 - Happy New Year - Add UNRAID_IP: This will determine if a container has its own IP or not. Fill in only if HOST is filled in. 13 / 11 / 2021 - Adding zoom in/out - Adding a filter - Add a HOST environment variable to set your HOSTNAME or dns (if ports are open) 07 / 11 / 2021 - Fixed problem with URL parameter. http://IP:PORT/vnc.html?resize=remote&host=192.168.0.4&port=6080&autoconnect=1 to http://IP:PORT/vnc.html?resize=remote&host=192.168.0.4&port=6080&autoconnect=1 03 / 11 / 2021: - Do not change the name of the application (Docker-WebUI). I omitted the list with this name. If you change it then you will see it listed. - If you are in version 6.10-rc2 (or newer), you can change the container name by adding an environment variable to each container (HOST_CONTAINERNAME). Thanks to @Meles Meles. 31 / 10 / 2021: - Add variable CIRCLE #This variable allows you to set or remove colored circles. Sorry for English. Translated with DeepL. Edited August 1, 2022 by Kameleon83 2 Quote Link to comment
Meles Meles Posted September 7, 2021 Share Posted September 7, 2021 It doesn't take into account a container having its own IP address Quote Link to comment
Kameleon83 Posted September 7, 2021 Author Share Posted September 7, 2021 1 hour ago, Meles Meles said: It doesn't take into account a container having its own IP address ?? Quote Link to comment
Meles Meles Posted September 8, 2021 Share Posted September 8, 2021 Put a container onto a macvlan network, and assign it an IP in the LAN range. Or even have the docker network make a DHCP assignment. Here's a docker network inspect for my network [ { "Name": "br0", "Id": "6c8a8d37276c8d82f047ccfb156aba833629db9e2d166cb9e8229463aac1d6ac", "Created": "2021-09-06T08:38:55.45040253+08:00", "Scope": "local", "Driver": "macvlan", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": {}, "Config": [ { "Subnet": "10.1.0.0/22", "IPRange": "10.1.2.64/27", "Gateway": "10.1.2.1", "AuxiliaryAddresses": { "server": "10.1.2.2" } } ] }, "Internal": false, "Attachable": false, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "d84731c04a826aeaa63fa0e88e2582e9875de2292904acdfe96f1cb2bd2aca01": { "Name": "pihole", "EndpointID": "bd20b00120acf20bdb6d0e2a27056104f0ec05ae0437297e985f992b485c51a0", "MacAddress": "02:42:0a:01:02:03", "IPv4Address": "10.1.2.3/22", "IPv6Address": "" } }, "Options": { "parent": "br0" }, "Labels": {} } ] so you can see, i have a container called "pihole" which has a manually assigned 10.1.2.3 IP which is accessible on my LAN proper. Quote Link to comment
Meles Meles Posted September 8, 2021 Share Posted September 8, 2021 (edited) I see you've fixed the container now... Cheers! Edited September 8, 2021 by Meles Meles Quote Link to comment
Natcoso9955 Posted September 9, 2021 Share Posted September 9, 2021 Im not able to access the webpage, error log attached, didn't change anything, just used default values in template. 5b20ea205e36.log.gz Quote Link to comment
gStone82 Posted October 21, 2021 Share Posted October 21, 2021 Any chance we can get an option to remove the colored circles? Also would be great if we were able to fix the webui's in place rather than having them randomly appear in different locations on every reload. Quote Link to comment
Meles Meles Posted October 21, 2021 Share Posted October 21, 2021 5 hours ago, gStone82 said: Also would be great if we were able to fix the webui's in place rather than having them randomly appear in different locations on every reload. Even alphabetically (case-insensitive!) sorted would be a start! Quote Link to comment
Banuseka Posted October 22, 2021 Share Posted October 22, 2021 Another addition would be to start/stop/restart a docker from the GUI Quote Link to comment
Stitzer Posted October 23, 2021 Share Posted October 23, 2021 Anyway to get it to also show the containers that are going through another container. like something going through binhex-delugevpn Quote Link to comment
Kameleon83 Posted October 24, 2021 Author Share Posted October 24, 2021 Bonsoir, Merci pour vos retours. Je vais essayer de modifier l'interface afin de satisfaire un maximum de personnes. ---------------------------------------------------------- Good evening, Thank you for your feedback. I will try to modify the interface to satisfy as many people as possible. 1 Quote Link to comment
Wispa Posted October 27, 2021 Share Posted October 27, 2021 On 10/23/2021 at 3:27 AM, Stitzer said: Anyway to get it to also show the containers that are going through another container. like something going through binhex-delugevpn +1 on this - not only does it not see containers that are routing via another (i.e. Jackett going via OpenVPN Client Container) - but it seems to stop working all together when a VPN container is active. Quote Link to comment
dsmith44 Posted October 31, 2021 Share Posted October 31, 2021 Hello. I am looking at this for use with the tailscale container I look after. Link below. The issue is that if you are coming in over a VPN connection all the links will be to the LAN ip address of the server and not the VPN ip address, this breaks them. I wonder is the source to this container on github or elsewhere, I'd be happy to look at adding the feature to rewrite the links and send a pull request if connected via tailscale. Thanks Dean Quote Link to comment
Kameleon83 Posted October 31, 2021 Author Share Posted October 31, 2021 Bonjour à toutes et à tous, Pour les problèmes d'ip via un vpn, je ne peux pour le moment réaliser ce changement. Mon application va juste chercher : /var/local/emhttp/plugins/dynamix.docker.manager/docker.json J'essaye certaines de vos configurations afin de trouver une solution. Mais je n'ai pas trouvé. Le moyen serait de pouvoir paramétrer chaque IP via une configuration. Si vous avez une solution, je veux bien l'essayer. Amicalement. -------------------------------- Hello to all of you, For the ip problems via a vpn, I can't at the moment make this change. My application will just search: /var/local/emhttp/plugins/dynamix.docker.manager/docker.json I'm trying some of your configurations to find a solution. But I didn't find it. The way would be to be able to set each IP via a configuration. If you have a solution, I would like to try it. With kind regards. Quote Link to comment
Meles Meles Posted November 3, 2021 Share Posted November 3, 2021 On 9/7/2021 at 3:38 PM, Kameleon83 said: - Do not change the name of the application (Docker-WebUI). I have omitted the list with this name. If you change it then you will see it listed. Once you are on 6.10-rc2 (or newer) containers get created with an environment variable called HOST_CONTAINERNAME which contains the name of the container (Docker-WebUI if left unchanged). If you check for the existence of this env-var then you can remove the hard-coding for "Docker-WebUI" Quote Link to comment
Meles Meles Posted November 4, 2021 Share Posted November 4, 2021 (edited) On 9/7/2021 at 3:38 PM, Kameleon83 said: If you are in version 6.10-rc2 (or newer), you can change the container name by adding an environment variable to each container (HOST_CONTAINERNAME). sorry, i wasn't clear enough.... from 6.10-rc2 the HOST_CONTAINERNAME env variable is automatically assigned to ALL docker containers on creation, therefore you'll be able to change your code to look for that variable and exclude the value stored in there. this is an example of a "docker run" command generated now by 6.10 docker run -d --name='Docker-WebUI' --net='downloads' -e TZ="Australia/Perth" -e HOST_OS="Unraid" -e HOST_HOSTNAME="skynet" -e HOST_CONTAINERNAME="Docker-WebUI" -e 'CIRCLE'='no' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8080]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/Olprog59/unraid-templates/main/docker-webui/docker-webui.png' -p '1111:8080/tcp' -v '/var/run/docker.sock':'/var/run/docker.sock':'rw' -v '/var/local/emhttp/plugins/dynamix.docker.manager':'/data':'ro' 'olprog/unraid-docker-webui' the HOST_HOSTNAME and HOST_CONTAINERNAME environment variables are new as of 6.10-rc2. They help our containers be "self-aware" when they need to be! Edited November 4, 2021 by Meles Meles Quote Link to comment
Kameleon83 Posted November 4, 2021 Author Share Posted November 4, 2021 6 hours ago, Meles Meles said: sorry, i wasn't clear enough.... from 6.10-rc2 the HOST_CONTAINERNAME env variable is automatically assigned to ALL docker containers on creation, therefore you'll be able to change your code to look for that variable and exclude the value stored in there. this is an example of a "docker run" command generated now by 6.10 docker run -d --name='Docker-WebUI' --net='downloads' -e TZ="Australia/Perth" -e HOST_OS="Unraid" -e HOST_HOSTNAME="skynet" -e HOST_CONTAINERNAME="Docker-WebUI" -e 'CIRCLE'='no' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:8080]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/Olprog59/unraid-templates/main/docker-webui/docker-webui.png' -p '1111:8080/tcp' -v '/var/run/docker.sock':'/var/run/docker.sock':'rw' -v '/var/local/emhttp/plugins/dynamix.docker.manager':'/data':'ro' 'olprog/unraid-docker-webui' the HOST_HOSTNAME and HOST_CONTAINERNAME environment variables are new as of 6.10-rc2. They help our containers be "self-aware" when they need to be! I had understood correctly Maybe I misspoke. I'm not good at English, so I use a translator (deepL). Here is the code I changed following this information last night. ------ Before ------- run.Webui != "" && (run.Name != "Docker-WebUI") ------ After ------- run.Webui != "" && (run.Name != "Docker-WebUI" || run.Name != os.Getenv("HOST_CONTAINERNAME")) Quote Link to comment
Meles Meles Posted November 5, 2021 Share Posted November 5, 2021 (edited) run.Webui != "" && (run.Name != "Docker-WebUI" || run.Name != os.Getenv("HOST_CONTAINERNAME")) that's always going to display it isn't it (whenever the env var isn't Docker-WebUI)? run.Name != "Docker-WebUI" OR run.Name != EnvVar some logic along these lines would be better checkName = os.Getenv("HOST_CONTAINERNAME") if checkName is null then checkName = 'Docker-WebUI' if run.Webui != "" and run.Name != checkName then display it Edited November 5, 2021 by Meles Meles Quote Link to comment
Kameleon83 Posted November 5, 2021 Author Share Posted November 5, 2021 2 minutes ago, Meles Meles said: run.Webui != "" && (run.Name != "Docker-WebUI" || run.Name != os.Getenv("HOST_CONTAINERNAME")) that's always going to display it isn't it (whenever the env var isn't Docker-WebUI)? run.Name != "Docker-WebUI" OR run.Name != EnvVar some logic along these lines would be better checkName = os.Getenv("HOST_CONTAINERNAME") if checkName is null then checkName = 'Docker-WebUI' if run.Webui != "" and run.Name != checkName then display it Yes, it's true. Quote Link to comment
Unraid-arr Posted November 6, 2021 Share Posted November 6, 2021 How do I scale the page smaller, it is too big and I would like all the containers dynamically adjusted to fit in 1 page. Thanks. If I use the Ctrl + (+/-) on browser then it also affects other pages with the same IPaddress/domain. I would rather just have this app be able to do it. Also, how can I link domain address instead of local IP:port. Thanks. Quote Link to comment
dada051 Posted November 7, 2021 Share Posted November 7, 2021 Hi, thanks for your job. A little request maybe? Could it be possible to have a textbox to filter (on-the-fly) the list ? ----------------- In French (because I'm): Serait-il possible d'avoir un champ text permettant de filtrer à la volée les dockers qui ont un nom qui contient la valeur du champ ? Merci beaucoup pour le taf en tout cas Quote Link to comment
Kameleon83 Posted November 7, 2021 Author Share Posted November 7, 2021 20 hours ago, Shomil Saini said: How do I scale the page smaller, it is too big and I would like all the containers dynamically adjusted to fit in 1 page. Thanks. If I use the Ctrl + (+/-) on browser then it also affects other pages with the same IPaddress/domain. I would rather just have this app be able to do it. Also, how can I link domain address instead of local IP:port. Thanks. Hello, I will try to put a scale on this page with the Ctrl(+/-) keys. As for the domain address instead of the IP lan, it is possible. However, the improvements will only be made in the next ten days or so. I'm quite busy these days. Quote Link to comment
Kameleon83 Posted November 7, 2021 Author Share Posted November 7, 2021 10 minutes ago, dada051 said: Hi, thanks for your job. A little request maybe? Could it be possible to have a textbox to filter (on-the-fly) the list ? ----------------- In French (because I'm): Serait-il possible d'avoir un champ text permettant de filtrer à la volée les dockers qui ont un nom qui contient la valeur du champ ? Merci beaucoup pour le taf en tout cas Hello and thank you, Yes, that's a good idea. I will try to integrate that later. I am quite busy in the coming days. --------------------- Bonjour et merci, Oui, c'est une bonne idée. Je vais essayer d'intégrer cela par la suite. Je suis assez occupé dans les jours à venir. 1 Quote Link to comment
Unraid-arr Posted November 7, 2021 Share Posted November 7, 2021 4 hours ago, Kameleon83 said: Hello, I will try to put a scale on this page with the Ctrl(+/-) keys. As for the domain address instead of the IP lan, it is possible. However, the improvements will only be made in the next ten days or so. I'm quite busy these days. Thanks for the update very much. Appreciate the job you have done. Bug - The URL is messed up for some dockers, I think it is being run through urlencode/urldecode functions. The & is changed to & in the example below for binhex-krusader - http://IP:PORT/vnc.html?resize=remote&host=192.168.0.4&port=6080&autoconnect=1 Quote Link to comment
Kameleon83 Posted November 7, 2021 Author Share Posted November 7, 2021 18 minutes ago, Shomil Saini said: Thanks for the update very much. Appreciate the job you have done. Bug - The URL is messed up for some dockers, I think it is being run through urlencode/urldecode functions. The & is changed to & in the example below for binhex-krusader - http://IP:PORT/vnc.html?resize=remote&host=192.168.0.4&port=6080&autoconnect=1 Thanks for your feedback. Being a small mistake, I took 2 minutes to correct it. Update and try again. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.