Skip to content

Instantly share code, notes, and snippets.

@xqm32
Last active February 28, 2024 08:44
Show Gist options
  • Save xqm32/9a205bff5b700d5e7b48d79e4635d161 to your computer and use it in GitHub Desktop.
Save xqm32/9a205bff5b700d5e7b48d79e4635d161 to your computer and use it in GitHub Desktop.
Docker Compose for Clash and YACD
services:
# See https://github.com/Dreamacro/clash/wiki/Running-Clash-as-a-service#docker
clash:
# ghcr.io/dreamacro/clash
# ghcr.io/dreamacro/clash-premium
# dreamacro/clash
# dreamacro/clash-premium
image: dreamacro/clash-premium
container_name: clash-premium
volumes:
- ./profiles/config.yaml:/root/.config/clash/config.yaml
- ./profiles:/root/.config/clash/profiles
# - ./ui:/ui # dashboard volume
ports:
- "7890:7890"
- "7891:7891"
- "9090:9090" # external controller (Restful API)
# TUN
# cap_add:
# - NET_ADMIN
# devices:
# - /dev/net/tun
restart: unless-stopped
network_mode: "bridge" # or "host" on Linux
# See https://github.com/Dreamacro/clash/wiki/Running-Clash-as-a-service#docker
yacd:
image: ghcr.io/haishanh/yacd:master
container_name: clash-yacd
ports:
- "1234:80"
restart: unless-stopped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment