You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,3 +10,77 @@ A docker image to run Keepalived.
10
10
This image require the kernel module ip_vs loaded on the host and need to be run with : --privileged --net=host
11
11
12
12
docker run --privileged --net=host -d osixia/keepalived
13
+
14
+
## Environment Variables
15
+
16
+
Environement variables defaults are set in **image/env.yaml**. You can modify environment variable values directly in this file and rebuild the image ([see manual build](#manual-build)). You can also override those values at run time with -e argument or by setting your own env.yaml file as a docker volume to `/etc/env.yaml`. See examples below.
17
+
18
+
-**KEEPALIVED_INTERFACE**: Keepalived network interface. Defaults to `eth0`
19
+
-**KEEPALIVED_PASSWORD**: Keepalived password. Defaults to `d0cker`
20
+
-**KEEPALIVED_PRIORITY** Keepalived node priority. Defaults to `150`
21
+
22
+
-**KEEPALIVED_UNICAST_PEERS** Keepalived unicast peers. Defaults to :
23
+
- 192.168.1.10
24
+
- 192.168.1.11
25
+
26
+
If you want to set this variable at docker run command convert the yaml in python :
27
+
28
+
docker run -e KEEPALIVED_UNICAST_PEERS="[192.168.1.10', '192.168.1.11']" -d osixia/phpldapadmin
29
+
30
+
To convert yaml to python online : http://yaml-online-parser.appspot.com/
31
+
32
+
33
+
-**KEEPALIVED_VIRTUAL_IPS** Add a read only user. Defaults to :
34
+
35
+
- 192.168.1.231
36
+
- 192.168.1.232
37
+
38
+
If you want to set this variable at docker run command convert the yaml in python, see above.
39
+
40
+
-**KEEPALIVED_NOTIFY** Script to execute when node state change. Defaults to `/container/service/keepalived/assets/notify.sh`
41
+
42
+
### Set environment variables at run time :
43
+
44
+
Environment variable can be set directly by adding the -e argument in the command line, for example :
45
+
46
+
docker run -e KEEPALIVED_INTERFACE="eno1" -e KEEPALIVED_PASSWORD="password!" \
47
+
-e KEEPALIVED_PRIORITY="100" -d osixia/keepalived
48
+
49
+
Or by setting your own `env.yaml` file as a docker volume to `/etc/env.yaml`
0 commit comments