@@ -69,15 +69,15 @@ WARNING:
69
69
70
70
![ logo] ( https://raw.githubusercontent.com/docker-library/docs/a6cc2c5f4bc6658168f2a0abbb0307acaefff80e/traefik/logo.png )
71
71
72
- [ Traefik] ( https://traefik.io ) is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy.
72
+ [ Traefik] ( https://traefik.io ) is a modern HTTP reverse proxy and ingress controller that makes deploying microservices easy.
73
73
74
- Traefik integrates with your existing infrastructure components ([ Docker] ( https://www.docker.com/ ) , [ Swarm mode ] ( https://docs.docker.com/engine/swarm/ ) , [ Kubernetes ] ( https://kubernetes.io ) , [ Marathon ] ( https://mesosphere.github. io/marathon/ ) , [ Consul ] ( https://www.consul .io/ ) , [ Etcd ] ( https://coreos.com/etcd/ ) , [ Rancher ] ( https://rancher.com ) , [ Amazon ECS] ( https://aws.amazon.com/ecs ) , ...) and configures itself automatically and dynamically.
74
+ Traefik integrates with your existing infrastructure components ([ Kubernetes ] ( https://kubernetes.io ) , [ Docker] ( https://www.docker.com/ ) , [ Swarm] ( https://docs.docker.com/engine/swarm/ ) , [ Consul ] ( https://www.consul. io/ ) , [ Nomad ] ( https://www.nomadproject .io/ ) , [ etcd ] ( https://coreos.com/etcd/ ) , [ Amazon ECS] ( https://aws.amazon.com/ecs ) , ...) and configures itself automatically and dynamically.
75
75
76
76
Pointing Traefik at your orchestrator should be the * only* configuration step you need.
77
77
78
- # Traefik v2 - Example usage
78
+ ## Traefik v3 - Example usage
79
79
80
- Enable ` docker ` provider and web UI:
80
+ Enable ` docker ` provider and dashboard UI:
81
81
82
82
``` yml
83
83
# # traefik.yml
@@ -92,112 +92,116 @@ api:
92
92
insecure : true
93
93
` ` `
94
94
95
- Start Traefik:
95
+ Start Traefik v3 :
96
96
97
- ` ` ` bash
97
+ ` ` ` sh
98
98
docker run -d -p 8080:8080 -p 80:80 \
99
- -v $PWD/traefik.yml:/etc/traefik/traefik.yml \
100
- -v /var/run/docker.sock:/var/run/docker.sock \
101
- traefik:v2.5
99
+ -v $PWD/traefik.yml:/etc/traefik/traefik.yml \
100
+ -v /var/run/docker.sock:/var/run/docker.sock \
101
+ traefik:v3
102
102
```
103
103
104
- Start a backend server, named ` test ` :
104
+ Start a backend server using the ` traefik/whoami ` image :
105
105
106
- ``` bash
106
+ ``` sh
107
107
docker run -d --name test traefik/whoami
108
108
```
109
109
110
- And finally, you can access to your ` whoami ` server throught Traefik, on the domain name ` test.docker.localhost ` :
110
+ Access the whoami service through Traefik via the defined rule ` test.docker.localhost ` :
111
111
112
112
``` console
113
- # $ curl --header ' Host:test.docker.localhost' ' http://localhost:80/'
114
113
$ curl test.docker.localhost
115
- Hostname: 390a880bdfab
114
+ Hostname: 0693100b16de
116
115
IP: 127.0.0.1
117
- IP: 172.17.0.3
116
+ IP: ::1
117
+ IP: 192.168.215.4
118
+ RemoteAddr: 192.168.215.3:57618
118
119
GET / HTTP/1.1
119
120
Host: test.docker.localhost
120
- User-Agent: curl/7.65.3
121
+ User-Agent: curl/8.7.1
121
122
Accept: */*
122
123
Accept-Encoding: gzip
123
- X-Forwarded-For: 172.17.0 .1
124
+ X-Forwarded-For: 192.168.215 .1
124
125
X-Forwarded-Host: test.docker.localhost
125
126
X-Forwarded-Port: 80
126
127
X-Forwarded-Proto: http
127
- X-Forwarded-Server: 7e073cb54211
128
- X-Real-Ip: 172.17.0 .1
128
+ X-Forwarded-Server: 8a37fd4f35fb
129
+ X-Real-Ip: 192.168.215 .1
129
130
```
130
131
131
- The web UI [ http://localhost:8080 ] ( http://localhost:8080 ) will give you an overview of the routers, services, and middlewares.
132
+ Access the Traefik Dashboard:
132
133
133
- ![ Web UI ] ( https ://raw.githubusercontent.com/traefik/traefik/v2.5/docs/content/assets/img/webui- dashboard.png )
134
+ Open your web browser and navigate to ` http ://localhost:8080 ` to access the Traefik dashboard. This will provide an overview of routers, services, and middlewares.
134
135
135
- # Traefik v1 - Example usage
136
+ ![ Dashboard UI ] ( https://raw.githubusercontent.com/traefik/traefik/v3.2/docs/content/assets/img/webui-dashboard.png )
136
137
137
- Grab a [ sample configuration file ] ( https://raw.githubusercontent.com/traefik/traefik/v1.7/traefik.sample.toml ) and rename it to ` traefik.toml ` . Enable ` docker ` provider and web UI:
138
+ ## Traefik v2 - Example usage
138
139
139
- ``` toml
140
- # # traefik.toml
140
+ Enable ` docker ` provider and dashboard UI:
141
141
142
- # API and dashboard configuration
143
- [ api ]
142
+ ``` yml
143
+ # # traefik.yml
144
144
145
145
# Docker configuration backend
146
- [docker ]
147
- domain = " docker.localhost"
146
+ providers :
147
+ docker :
148
+ defaultRule : " Host(`{{ trimPrefix `/` .Name }}.docker.localhost`)"
149
+
150
+ # API and dashboard configuration
151
+ api :
152
+ insecure : true
148
153
` ` `
149
154
150
- Start Traefik:
155
+ Start Traefik v2 :
151
156
152
- ``` bash
157
+ ` ` ` sh
153
158
docker run -d -p 8080:8080 -p 80:80 \
154
- -v $PWD /traefik.toml :/etc/traefik/traefik.toml \
159
+ -v $PWD/traefik.yml :/etc/traefik/traefik.yml \
155
160
-v /var/run/docker.sock:/var/run/docker.sock \
156
- traefik:v1.7
161
+ traefik:v2.11
157
162
```
158
163
159
- Start a backend server, named ` test ` :
164
+ Start a backend server using the ` traefik/whoami ` image :
160
165
161
- ``` bash
166
+ ``` sh
162
167
docker run -d --name test traefik/whoami
163
168
```
164
169
165
- And finally, you can access to your ` whoami ` server throught Traefik, on the domain name ` {containerName}.{configuredDomain} ` ( ` test.docker.localhost ` ) :
170
+ Access the whoami service through Traefik via the defined rule ` test.docker.localhost ` :
166
171
167
172
``` console
168
- # $ curl --header ' Host:test.docker.localhost' ' http://localhost:80/'
169
- $ curl ' http://test.docker.localhost'
170
- Hostname: 117c5530934d
173
+ $ curl test.docker.localhost
174
+ Hostname: 390a880bdfab
171
175
IP: 127.0.0.1
172
- IP: ::1
173
176
IP: 172.17.0.3
174
- IP: fe80::42:acff:fe11:3
175
177
GET / HTTP/1.1
176
178
Host: test.docker.localhost
177
- User-Agent: curl/7.35.0
179
+ User-Agent: curl/7.65.3
178
180
Accept: */*
179
181
Accept-Encoding: gzip
180
182
X-Forwarded-For: 172.17.0.1
181
- X-Forwarded-Host: 172.17.0.3:80
183
+ X-Forwarded-Host: test.docker.localhost
184
+ X-Forwarded-Port: 80
182
185
X-Forwarded-Proto: http
183
- X-Forwarded-Server: f2e05c433120
186
+ X-Forwarded-Server: 7e073cb54211
187
+ X-Real-Ip: 172.17.0.1
184
188
```
185
189
186
- The web UI [ http://localhost:8080 ] ( http://localhost:8080 ) will give you an overview of the frontends/backends and also a health dashboard.
190
+ Access the Traefik Dashboard:
191
+
192
+ Open your web browser and navigate to ` http://localhost:8080 ` to access the Traefik dashboard. This will provide an overview of routers, services, and middlewares.
187
193
188
- ![ Web UI Providers ] ( https://raw.githubusercontent.com/traefik/traefik/v1.7 /docs/img/web.frontend .png )
194
+ ![ Dashboard UI] ( https://raw.githubusercontent.com/traefik/traefik/v2.0 /docs/content/assets/ img/webui-dashboard .png )
189
195
190
- # Documentation
196
+ ## Documentation
191
197
192
198
You can find the complete documentation:
193
199
194
- - for [ v2 .x] ( https://doc.traefik.io/traefik/ )
195
- - for [ v1.7 ] ( https://doc.traefik.io/traefik/v1.7 )
200
+ - for [ v3 .x] ( https://doc.traefik.io/traefik/ )
201
+ - for [ v2.11 ] ( https://doc.traefik.io/traefik/v2.11 )
196
202
197
203
A community support is available at [ https://community.traefik.io ] ( https://community.traefik.io )
198
204
199
- A collection of contributions around Traefik can be found at [ https://awesome.traefik.io ] ( https://awesome.traefik.io ) .
200
-
201
205
# Image Variants
202
206
203
207
The ` traefik ` images come in many flavors, each designed for a specific use case.
0 commit comments