Skip to content

Commit 95fbb84

Browse files
committed
docs: update docker socket part
1 parent e9dbfb2 commit 95fbb84

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,22 @@ Newt can integrate with the Docker socket to provide remote inspection of Docker
205205

206206
**Configuration:**
207207

208-
You can specify the Docker socket path using the `--docker-socket` CLI argument or by setting the `DOCKER_SOCKET` environment variable. On most linux systems the socket is `/var/run/docker.sock`. When deploying newt as a container, you need to mount the host socket as a volume for the newt container to access it. If the Docker socket is not available or accessible, Newt will gracefully disable Docker integration and continue normal operation.
208+
You can specify the Docker socket path using the `--docker-socket` CLI argument or by setting the `DOCKER_SOCKET` environment variable. If the Docker socket is not available or accessible, Newt will gracefully disable Docker integration and continue normal operation.
209+
210+
Supported values include:
211+
212+
- Local UNIX socket (default):
213+
>You must mount the socket file into the container using a volume, so Newt can access it.
214+
`unix:///var/run/docker.sock`
215+
216+
- TCP socket (e.g., via Docker Socket Proxy):
217+
`tcp://localhost:2375`
218+
219+
- HTTP/HTTPS endpoints (e.g., remote Docker APIs):
220+
`http://your-host:2375`
221+
222+
- SSH connections (experimental, requires SSH setup):
223+
`ssh://user@host`
209224

210225
```yaml
211226
services:
@@ -219,8 +234,9 @@ services:
219234
- PANGOLIN_ENDPOINT=https://example.com
220235
- NEWT_ID=2ix2t8xk22ubpfy
221236
- NEWT_SECRET=nnisrfsdfc7prqsp9ewo1dvtvci50j5uiqotez00dgap0ii2
222-
- DOCKER_SOCKET=/var/run/docker.sock
237+
- DOCKER_SOCKET=unix:///var/run/docker.sock
223238
```
239+
>If you previously used just a path like `/var/run/docker.sock`, it still works — Newt assumes it is a UNIX socket by default.
224240

225241
#### Hostnames vs IPs
226242

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func main() {
158158
flag.StringVar(&tlsPrivateKey, "tls-client-cert", "", "Path to client certificate used for mTLS")
159159
}
160160
if dockerSocket == "" {
161-
flag.StringVar(&dockerSocket, "docker-socket", "", "Path to Docker socket (typically /var/run/docker.sock)")
161+
flag.StringVar(&dockerSocket, "docker-socket", "", "Path or address to Docker socket (typically unix:///var/run/docker.sock)")
162162
}
163163
if pingIntervalStr == "" {
164164
flag.StringVar(&pingIntervalStr, "ping-interval", "3s", "Interval for pinging the server (default 3s)")

0 commit comments

Comments
 (0)