Skip to content

Commit e32527c

Browse files
committed
Readme: example config for docker-socket-proxy
1 parent efa20a2 commit e32527c

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ List of environment variables for more customization:
101101
| CADVISOR_PORT | 8080 | |
102102
| ENABLE_DATA_API | true | Use this env to export the `/data` API that returns the swarm status as a JSON object. Note that it requires basic-auth if `ENABLE_AUTHENTICATION` is activated. |
103103
| ENABLE_NETWORKS | false | `true` by default, set to `false` to remove the network section from the dashboard. |
104-
| DOCKER_SOCKET | tcp://localhost:2375 | `/var/run/docker.sock` by default. You can use it with [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy). |
104+
| DOCKER_SOCKET | tcp://dockerproxy:2375 | `/var/run/docker.sock` by default. You can use it with [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy). |
105105

106106
## Security
107107

@@ -111,7 +111,7 @@ List of environment variables for more customization:
111111

112112
+ Using the `ENABLE_HTTPS` environment variable, there is an option to use `HTTPS` and `WSS`. We have Let’s Encrypt integration with the DNS challenge. See the example for more info.
113113

114-
+ You can use [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy) with the `DOCKER_SOCKET` environment variable to minimize permissions and enhance security.
114+
+ You can use [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy) with the `DOCKER_SOCKET` environment variable to minimize permissions and enhance security. Make sure that `swarm-dashboard` and `docker-socket-proxy` are in the same network. See the example configuration in [test-cluster/compose-dashboard.yml](./test-cluster/compose-dashboard.yml) for more detail.
115115

116116
## Rough roadmap
117117

test-cluster/compose-dashboard.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ services:
1313
ENABLE_HTTPS: "false"
1414
NODE_EXPORTER_SERVICE_NAME_REGEX: "node-exporter"
1515
CADVISOR_SERVICE_NAME_REGEX: "cadvisor"
16+
# DOCKER_SOCKET: "/var/run/docker.sock"
17+
DOCKER_SOCKET: "tcp://dockerproxy:2375"
18+
networks:
19+
- monitoring_net
20+
21+
# using dockerproxy is optional
22+
# see https://github.com/Tecnativa/docker-socket-proxy#usage
23+
dockerproxy:
24+
image: tecnativa/docker-socket-proxy
25+
container_name: dockerproxy
26+
privileged: true
27+
volumes:
28+
- /var/run/docker.sock:/var/run/docker.sock
29+
ports:
30+
- "127.0.0.1:2375:2375"
31+
environment:
32+
NODES: 1
33+
NETWORKS: 1
34+
SERVICES: 1
35+
TASKS: 1
1636
networks:
1737
- monitoring_net
1838

0 commit comments

Comments
 (0)