Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

docker 运行openwrt 为 host网络模式,直接给我宿主机界面接管了..... #74

Open
baozitao opened this issue Dec 25, 2022 · 3 comments

Comments

@baozitao
Copy link

背景:

  1. 宿主机为Linux manjaro操作系统,跑的docker openwrt
  2. 使用docker 运行openwrt 为macvlan模式,重启宿主机,一切正常;

问题:
当我使用docker 运行openwrt 为 host 模式时,重启宿主机,宿主机直接进openwrt 的终端了,不再进入宿主机的界面

docker run --restart always --name openwrt -d --network host--privileged sulinggg/openwrt:amd64 /sbin/init

这一运行,我重启我的linux 机器,直接进入openwrt的命令行界面,我的原来宿主机的界面进不去了,真是奇葩......这现象是正常的么?

@yu1745
Copy link

yu1745 commented Dec 27, 2022

因为你加了--privileged,宿主机的tty也被被映射进去了

@baozitao
Copy link
Author

baozitao commented Dec 27, 2022 via email

@mazimao123
Copy link

-restart no 就行了,,不要选永远,,,,太危险了,,,不小心就是重复重启

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants