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.

怎么让两个容器共用一个网络,也就是container网络模式

Featured Replies

我有两个应用程序nginx反代应用程序和ddns应用程序,

nginx容器使用br0可以获取独立的公网IPV6,但如果ddns在另一个容器中将不能正确获取ip地址。如何使用ddns容器共用nginx容器的网络。

 

目前唯一的方式是手动执行docker命令建立容器,其他方式即使使用自定义模板由于不识别container模式关键字也会自动替换为none。

官方为什么不支持container模式的网络?

Edited by lvxj11

  • lvxj11 changed the title to 怎么让两个容器共用一个网络,也就是container网络模式
  • Author

找到方法,安装Docker Compose Manager插件。

然后写docker-compose.yml就可以了。

  • 3 weeks later...

大佬,安装插件之后还能在Unraid的docker选项里面编辑了吗,我以前用命令行新建的镜像没法用unraid的webui编辑

  • Author
On 5/9/2023 at 7:01 PM, loveliveao said:

大佬,安装插件之后还能在Unraid的docker选项里面编辑了吗,我以前用命令行新建的镜像没法用unraid的webui编辑

安装插件后会有web管理

FireShot Capture 002.png

如果只是解决DDNS,不需要两个Docker的。

我用的ddns-go

在nginx docker的配置中映射ddns的执行文件和配置文件,在加一个启动的sh就可以了。

Quote

/ddns ----> /mnt/user/appdata/Nginx/ddns/
/start.sh ----> /mnt/user/appdata/Nginx/start.sh
/root/.ddns_go_config.yaml ----> /mnt/user/appdata/Nginx/ddns_go_config.yaml

 

 

sh内容如下

#!/bin/bash
/ddns/ddns-go
/bin/bash

 

  • 1 month later...
  • Author
On 5/13/2023 at 2:47 PM, dengniweiyi said:

如果只是解决DDNS,不需要两个Docker的。

我用的ddns-go

在nginx docker的配置中映射ddns的执行文件和配置文件,在加一个启动的sh就可以了。

 

 

sh内容如下

#!/bin/bash
/ddns/ddns-go
/bin/bash

 

也是个解决方法

主要是个人偏好

1. 尽量只在webui操作

2. 尽量不用控制台

3. 最好能自动更新

4. 每个容器最好只有一个进程,如果有多个进程需要有守护程序监控进程状态。

Edited by lvxj11

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.