mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-24 17:41:29 +00:00
32 lines
532 B
Markdown
32 lines
532 B
Markdown
|
---
|
||
|
icon: material/docker
|
||
|
---
|
||
|
|
||
|
# Docker
|
||
|
|
||
|
## :material-console: Command
|
||
|
|
||
|
```bash
|
||
|
docker run -d \
|
||
|
-v /etc/sing-box:/etc/sing-box/ \
|
||
|
--name=sing-box \
|
||
|
--restart=always \
|
||
|
ghcr.io/sagernet/sing-box \
|
||
|
-D /var/lib/sing-box \
|
||
|
-C /etc/sing-box/ run
|
||
|
```
|
||
|
|
||
|
## :material-box-shadow: Compose
|
||
|
|
||
|
```yaml
|
||
|
version: "3.8"
|
||
|
services:
|
||
|
sing-box:
|
||
|
image: ghcr.io/sagernet/sing-box
|
||
|
container_name: sing-box
|
||
|
restart: always
|
||
|
volumes:
|
||
|
- /etc/sing-box:/etc/sing-box/
|
||
|
command: -D /var/lib/sing-box -C /etc/sing-box/ run
|
||
|
```
|