Skip to content

Commit b724897

Browse files
author
vsilent
committed
mount docker.sock to stackdog container
1 parent 8437ada commit b724897

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ docker run --rm -it \
8787
-e APP_PORT=5000 \
8888
-e DATABASE_URL=/data/stackdog.db \
8989
-v stackdog-data:/data \
90+
-v /var/run/docker.sock:/var/run/docker.sock \
9091
trydirect/stackdog:latest
9192
```
9293

@@ -98,6 +99,15 @@ curl http://localhost:5000/api/threats
9899
curl http://localhost:5000/api/alerts
99100
```
100101

102+
Mount the Docker socket when you want Docker-aware features such as container listing, live stats,
103+
mail abuse guard polling, Docker log discovery, and Docker-backed quarantine/release flows.
104+
105+
If you do not want Stackdog to access the Docker daemon, disable the mail guard:
106+
107+
```bash
108+
STACKDOG_MAIL_GUARD_ENABLED=false
109+
```
110+
101111
To try log sniffing inside Docker against host log files, mount them read-only and run the
102112
`sniff` subcommand instead of the default HTTP server:
103113

@@ -121,6 +131,7 @@ docker run --rm -it \
121131
-e APP_PORT=5000 \
122132
-e DATABASE_URL=/data/stackdog.db \
123133
-v stackdog-data:/data \
134+
-v /var/run/docker.sock:/var/run/docker.sock \
124135
stackdog-local
125136
```
126137

@@ -139,7 +150,7 @@ This starts:
139150

140151
The compose stack uses:
141152

142-
- `stackdog` service — builds `docker/local/Dockerfile` and runs `stackdog serve`
153+
- `stackdog` service — builds `docker/backend/Dockerfile`, runs `stackdog serve`, and mounts `/var/run/docker.sock`
143154
- `stackdog-ui` service — builds the React app and serves it with Nginx
144155
- `stackdog-data` volume — persists the SQLite database between restarts
145156

docker-compose.app.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ services:
1313
- "5000:5000"
1414
volumes:
1515
- stackdog-data:/data
16+
- /var/run/docker.sock:/var/run/docker.sock
1617

1718
stackdog-ui:
1819
build:

0 commit comments

Comments
 (0)