一、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
访问地址
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://blog.csdn.net/wdq875667601/article/details/126396124?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171836840916800226555627%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=171836840916800226555627&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-18-126396124-null-null.nonecase&utm_term=docker%E3%80%81%E5%A5%BD%E7%94%A8