Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit de1fe80

Browse files
adding a docker socket proxy
1 parent 14f0269 commit de1fe80

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

‎traefik-dynamic/conf/traefik.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ log:
1818

1919
providers:
2020
docker:
21-
endpoint: unix:///var/run/docker.sock
21+
#endpoint: unix:///var/run/docker.sock
22+
endpoint: tcp://dockerproxy:2375
23+
network: dockerproxynet
2224
exposedByDefault: false
2325
watch: true
2426
swarmMode: false

‎traefik-dynamic/docker-compose.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
11
---
22

33
services:
4+
dockerproxy:
5+
image: tecnativa/docker-socket-proxy:edge
6+
restart: always
7+
container_name: dockerproxy
8+
networks:
9+
- dockerproxynet
10+
volumes:
11+
- /var/run/docker.sock:/var/run/docker.sock:ro
12+
environment:
13+
LOG_LEVEL: info
14+
# 0 to revoke access / 1 to grant access.
15+
## Granted by Default
16+
EVENTS: 1
17+
PING: 1
18+
VERSION: 1
19+
## Revoked by Default
20+
# Security critical
21+
AUTH: 0
22+
SECRETS: 0
23+
# Not always needed
24+
BUILD: 0
25+
COMMIT: 0
26+
CONFIGS: 0
27+
CONTAINERS: 1 # Traefik, portainer, etc.
28+
DISTRIBUTION: 0
29+
EXEC: 0
30+
IMAGES: 1 # Portainer
31+
INFO: 1 # Portainer
32+
NETWORKS: 1 # Portainer
33+
NODES: 0
34+
PLUGINS: 0
35+
SERVICES: 1 # Portainer
36+
SESSION: 0
37+
SWARM: 0
38+
SYSTEM: 0
39+
TASKS: 1 # Portainer
40+
VOLUMES: 1 # Portainer
41+
TZ: "Europe/Paris"
42+
443
traefik:
544
image: traefik:${TRAEFIKVERSION}
645
restart: unless-stopped
46+
networks:
47+
- dockerproxynet
748
ports:
849
- target : 80
950
published : 80
@@ -19,10 +60,12 @@ services:
1960
- ./conf/traefikdynamic:/etc/traefik/dynamic:ro
2061
- ./logs/traefik.log:/etc/traefik/applog.log
2162
- /etc/localtime:/etc/localtime:ro
22-
- /var/run/docker.sock:/var/run/docker.sock:ro
63+
#- /var/run/docker.sock:/var/run/docker.sock:ro
2364
environment:
2465
TRAEFIK_PILOT_DASHBOARD: "false"
2566
TZ: "Europe/Paris"
67+
depends_on:
68+
- dockerproxy
2669

2770
nginx:
2871
image: nginx:${NGINXVERSION}
@@ -34,3 +77,10 @@ services:
3477
volumes:
3578
nginxdata:
3679
nginxlogs:
80+
81+
networks:
82+
dockerproxynet:
83+
name: dockerproxynet
84+
ipam:
85+
config:
86+
- subnet: 172.16.10.0/24

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /