一、Host模式
拉取镜像
docker pull onething1/wxedge
启动容器
docker run -d --name=wxy --restart=always --privileged --net=host --tmpfs /run --tmpfs /tmp -v /home/qiang/data/wxy:/storage:rw onething1/wxedge
docker-compose.yaml
version: '3'
services:
wxy:
image: onething1/wxedge:latest
container_name: wxy
restart: always
privileged: true
network_mode: "host"
tmpfs:
- /tmp
- /run
volumes:
- /home/qiang/data/wxy:/storage:rw
访问地址
http://192.168.1.206:18888
二、MacVlan模式
创建macvlan网络
docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=wlp2s0b1 docker_network
ip link add server_network link wlp2s0b1 type macvlan mode bridge
ip addr add 192.168.1.45 dev server_network
ip link set server_network up
ip route add 192.168.1.66 dev server_network
docker-compose.yaml
version: '3'
services:
wxy:
image: onething1/wxedge:latest
container_name: wxy
hostname: wxy
restart: always
privileged: true
tmpfs:
- /tmp
- /run
volumes:
- /home/qiang/data/wxy:/storage:rw
networks:
default:
ipv4_address: 192.168.1.66
networks:
default:
external:
name: docker_network
访问地址文章来源:https://www.toymoban.com/news/detail-519688.html
http://192.168.1.66:18888
作者(Author):小强崽
来源(Source):https://www.wuduoqiang.com/archives/Docker安装网心云
协议(License):署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
版权(Copyright):商业转载请联系作者获得授权,非商业转载请注明出处。 For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.文章来源地址https://www.toymoban.com/news/detail-519688.html
到了这里,关于Docker安装网心云的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!