File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,8 @@ Quick example, with the default config.
121121
122122 #Add the pair "ip hostname" to /etc/hosts on each containers,
123123 #beacause ldap.example.org and ldap2.example.org are fake hostnames
124- docker exec $LDAP_CID /sbin/add-host $LDAP2_IP ldap2.example.org
125- docker exec $LDAP2_CID /sbin/add-host $LDAP_IP ldap.example.org
126-
124+ docker exec $LDAP_CID bash -c "echo $LDAP2_IP ldap2.example.org >> /etc/hosts"
125+ docker exec $LDAP2_CID bash -c "echo $LDAP_IP ldap.example.org >> /etc/hosts"
127126
128127That's it ! But a litle test to be sure :
129128
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ load test_helper
7171 run_image -h ldap.example.org -e LDAP_REPLICATION=true -e IS_REPLICATION_TEST=true
7272
7373 # add route to hosts
74- docker exec $LDAP_REPL_CID /sbin/add-host $CONTAINER_IP ldap .example.org
75- docker exec $CONTAINER_ID /sbin/add-host $LDAP_REPL_IP ldap2 .example.org
74+ docker exec $LDAP_CID bash -c " echo $LDAP2_IP ldap2 .example.org >> /etc/hosts "
75+ docker exec $LDAP2_CID bash -c " echo $LDAP_IP ldap .example.org >> /etc/hosts "
7676
7777 # wait services on both servers
7878 wait_service slapd
You can’t perform that action at this time.
0 commit comments