github.com/sagernet/sing-box@v1.9.0-rc.20/docs/installation/docker.md (about) 1 --- 2 icon: material/docker 3 --- 4 5 # Docker 6 7 ## :material-console: Command 8 9 ```bash 10 docker run -d \ 11 -v /etc/sing-box:/etc/sing-box/ \ 12 --name=sing-box \ 13 --restart=always \ 14 ghcr.io/sagernet/sing-box \ 15 -D /var/lib/sing-box \ 16 -C /etc/sing-box/ run 17 ``` 18 19 ## :material-box-shadow: Compose 20 21 ```yaml 22 version: "3.8" 23 services: 24 sing-box: 25 image: ghcr.io/sagernet/sing-box 26 container_name: sing-box 27 restart: always 28 volumes: 29 - /etc/sing-box:/etc/sing-box/ 30 command: -D /var/lib/sing-box -C /etc/sing-box/ run 31 ```