Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[教程] Docker 页面加载缓慢原因与解决方案

Featured Replies

最近发现很多时候 Docker 页面加载特别慢, 表现为刷新后出现 UnRIAD 图标 loading, 最晚可能需要 50s 才能加载出来页面.

 

最后综合控制台日志以及排查发现根本原因: 打开 Docker 这个页面时会发送一个 `/plugins/dynamix.docker.manager/include/DockerContainers.php` 同步请求. 该请求会返回 HTML 响应, 该请求需要后台同步下载所有 Docker Container 的 icon 图标.

 

所以当国内用户使用时, 如果模版中 Docker 配置了 github 图标 或者图标下载地址有问题(例如限速等), 则后台下载会非常缓慢; 一但后台下载缓慢就会阻塞前端页面请求, 表现就是打开 Docker 页面好几分钟都加载不出来.

 

针对这种情况目前解决方案也很简单: 将图片手动上传到国内图床, 比如微博、upyun CDN 等等; 当然一步到位下载到 NAS 本身也可以, 总之需要能拿到一个可直接访问的 http 链接地址.

 

接下来针对 Docker 容器或者 Docker Compse 容器进行配置即可:

 

应用商店(CA) 安装的 Docker 应用: 

 

编辑 --> 添加另一个路径、端口、变量、标签或设备

 

Xnip2023-02-15_14-01-39.thumb.png.182ab7f8df71e528a0accebbc29a7e42.png

 

添加一个标签, 名称随便写, 方便起见填 icon, 键 必须为 net.unraid.docker.icon ,值填写你期望使用的 icon 的 http(s) 地址

 

Xnip2023-02-15_14-02-48.thumb.png.d5aab9205ac0350e3201b1c3a1714ed1.png

 

点击应用后替换完成.

 

Docker Compose 应用: 

 

EDIT STACK 

Xnip2023-02-15_14-07-31.thumb.png.84090852aa2307dac5e004d8fc44b1bc.png

 

UI LABLES

Xnip2023-02-15_14-07-43.png.2cbd3ca668c094fe691db9304e81a980.png

 

修改 icon 保存即可

Xnip2023-02-15_14-08-08.thumb.png.0dcbf712e84bab9ba9710ea778151e33.png

 

 

其他提示:

 

UnRAID Dcoker 相关的一些 UI 配置通过 docker label 完成:

 

net.unraid.docker.icon: 容器的图标
net.unraid.docker.webui: 右键 “Web UI” 打开的地址, 默认可以通过模版引用当前 NAS 地址(http://[IP]:[PORT:8096])

 

这些 xml 模版存储在 /boot/config/plugins/dockerMan/templates-user 目录中

 

Docker Compose 插件也遵循类似设置, 不同的是其 Web UI、icon 等配置存储在 /boot/config/plugins/compose.manager/projects/*/*.yml 中.

理论上 Docker Compose 中直接定义这些 label 应该也行, 不需要通过 UI 修改.

Edited by kovacs_orz

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.