@@ -5,7 +5,7 @@ Automatic update `/etc/hosts` on start/stop containers by labels.
5
5
Requirements
6
6
-----
7
7
* ** Native linux**
8
- _ This tool has no effect on macOS or windows, because docker on this OS running in
8
+ _ This tool has no effect on macOS or windows, because docker on these OS running in
9
9
VM and you can't directly access from host to each container via ip._
10
10
11
11
Usage
@@ -30,7 +30,7 @@ Try to ping from host
30
30
31
31
Multiple Hosts
32
32
-----
33
- You can add multiple hosts, just separate it by semicolon:
33
+ You can add multiple hosts, just separate them by semicolon:
34
34
35
35
``` bash
36
36
$ docker run --label ru.grachevko.dhu=" nginx.local;nginx.ru" nginx
@@ -40,7 +40,7 @@ $ ping nginx.ru
40
40
41
41
Subdomains
42
42
-----
43
- Add subdomains by used pattern ` {www,api}.nginx.local ` :
43
+ Add subdomains by using pattern ` {www,api}.nginx.local ` :
44
44
45
45
``` bash
46
46
$ docker run -d --label ru.grachevko.dhu=" {www,api}.nginx.local" nginx
@@ -51,26 +51,26 @@ $ ping api.nginx.local
51
51
52
52
Priority
53
53
----
54
- If you want to run two containers with same hosts and want that one will override another,
54
+ If you want to run two containers with same hosts and want one override another,
55
55
just add priority after colon:
56
56
57
57
``` bash
58
58
$ docker run -d --label ru.grachevko.dhu=" nginx.local" nginx
59
59
$ docker run -d --label ru.grachevko.dhu=" nginx.local:10" nginx
60
60
$ ping nginx.local
61
61
```
62
- Container with greater priority will be used, by default priority is 0.
63
- If priority are the same then early created container will be used.
62
+ Container with greater priority will be used. Default priority 0.
63
+ If priority is the same then early created container will be used.
64
64
65
65
Load Balancer
66
66
----
67
- In order to pass traffic through loadbalancer you can define container name which ip will be used to record in hosts.
68
- Just add one more colon and container name after.
67
+ To pass the traffic through the loadbalancer you should define container's name in order to use it's ip for recording in hosts.
68
+ Just add one more colon and container name after it .
69
69
``` bash
70
70
$ docker run -d --name lb nginx
71
71
$ docker run -d --label ru.grachevko.dhu=" nginx1.local:0:lb" nginx
72
72
$ docker run -d --label ru.grachevko.dhu=" nginx2.local:0:lb" nginx
73
73
$ ping nginx1.local // ip of lb
74
74
$ ping nginx2.local // ip of lb
75
75
```
76
- Keep in mind, loadbalancer container must have fixed name.
76
+ Keep in mind, loadbalancer container must have fixed name.
0 commit comments