Skip to content

Commit a9d8ec0

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

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,27 @@ 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+
215+
`unix:///var/run/docker.sock`
216+
217+
- TCP socket (e.g., via Docker Socket Proxy):
218+
219+
`tcp://localhost:2375`
220+
221+
- HTTP/HTTPS endpoints (e.g., remote Docker APIs):
222+
223+
`http://your-host:2375`
224+
225+
- SSH connections (experimental, requires SSH setup):
226+
227+
`ssh://user@host`
228+
209229

210230
```yaml
211231
services:
@@ -219,8 +239,9 @@ services:
219239
- PANGOLIN_ENDPOINT=https://example.com
220240
- NEWT_ID=2ix2t8xk22ubpfy
221241
- NEWT_SECRET=nnisrfsdfc7prqsp9ewo1dvtvci50j5uiqotez00dgap0ii2
222-
- DOCKER_SOCKET=/var/run/docker.sock
242+
- DOCKER_SOCKET=unix:///var/run/docker.sock
223243
```
244+
>If you previously used just a path like `/var/run/docker.sock`, it still works — Newt assumes it is a UNIX socket by default.
224245

225246
#### Hostnames vs IPs
226247

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)