Created
August 13, 2023 07:44
-
-
Save cute-angelia/1395ea4d4d065e726c0a8bba437ffdea to your computer and use it in GitHub Desktop.
clash docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
clash: | |
container_name: Clash | |
image: dreamacro/clash-premium | |
restart: unless-stopped | |
privileged: true | |
devices: | |
- /dev/net/tun | |
volumes: | |
- /root/app/clash:/root/.config/clash | |
ports: | |
- "7890:7890" | |
- "7891:7891" | |
- "9090:9090" # external controller (Restful API) | |
networks: | |
magic: | |
ipv4_address: 192.168.3.2 | |
adguard: | |
container_name: Adguard | |
image: adguard/adguardhome | |
restart: unless-stopped | |
volumes: | |
- /root/app/adguardhome/conf:/opt/adguardhome/conf | |
- /root/app/adguardhome/work:/opt/adguardhome/work | |
networks: | |
magic: | |
ipv4_address: 192.168.3.53 | |
yacd: | |
image: ghcr.io/haishanh/yacd:master | |
container_name: clash-yacd | |
ports: | |
- "1234:80" | |
restart: unless-stopped | |
networks: | |
magic: | |
name: macnet | |
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker network create -d macvlan \ | |
--subnet=192.168.3.0/24 \ | |
--gateway=192.168.3.1 \ | |
-o parent=eth0 \ | |
macnet | |
# [↑自己根据 所在网段 宿主机修改] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment