Browse code

Remove references to the docker-ut image

Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>

Aidan Hobson Sayers authored on 2015/10/15 23:01:55
Showing 1 changed files
... ...
@@ -81,42 +81,43 @@ On the Docker host (192.168.1.52) that Redis will run on:
81 81
     ^D
82 82
 
83 83
     # add redis ambassador
84
-    $ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 busybox sh
84
+    $ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 alpine:3.2 sh
85 85
 
86 86
 In the `redis_ambassador` container, you can see the linked Redis
87 87
 containers `env`:
88 88
 
89
-    $ env
89
+    / # env
90 90
     REDIS_PORT=tcp://172.17.0.136:6379
91 91
     REDIS_PORT_6379_TCP_ADDR=172.17.0.136
92 92
     REDIS_NAME=/redis_ambassador/redis
93 93
     HOSTNAME=19d7adf4705e
94
+    SHLVL=1
95
+    HOME=/root
94 96
     REDIS_PORT_6379_TCP_PORT=6379
95
-    HOME=/
96 97
     REDIS_PORT_6379_TCP_PROTO=tcp
97
-    container=lxc
98 98
     REDIS_PORT_6379_TCP=tcp://172.17.0.136:6379
99 99
     TERM=xterm
100 100
     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
101 101
     PWD=/
102
+    / # exit
102 103
 
103 104
 This environment is used by the ambassador `socat` script to expose Redis
104 105
 to the world (via the `-p 6379:6379` port mapping):
105 106
 
106 107
     $ docker rm redis_ambassador
107
-    $ sudo ./contrib/mkimage-unittest.sh
108
-    $ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 docker-ut sh
109
-
110
-    $ socat -t 100000000 TCP4-LISTEN:6379,fork,reuseaddr TCP4:172.17.0.136:6379
108
+    $ CMD="apk update && apk add socat && sh"
109
+    $ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 alpine:3.2 sh -c "$CMD"
110
+    [...]
111
+    / # socat -t 100000000 TCP4-LISTEN:6379,fork,reuseaddr TCP4:172.17.0.136:6379
111 112
 
112 113
 Now ping the Redis server via the ambassador:
113 114
 
114 115
 Now go to a different server:
115 116
 
116
-    $ sudo ./contrib/mkimage-unittest.sh
117
-    $ docker run -t -i --expose 6379 --name redis_ambassador docker-ut sh
118
-
119
-    $ socat -t 100000000 TCP4-LISTEN:6379,fork,reuseaddr TCP4:192.168.1.52:6379
117
+    $ CMD="apk update && apk add socat && sh"
118
+    $ docker run -t -i --expose 6379 --name redis_ambassador alpine:3.2 sh -c "$CMD"
119
+    [...]
120
+    / # socat -t 100000000 TCP4-LISTEN:6379,fork,reuseaddr TCP4:192.168.1.52:6379
120 121
 
121 122
 And get the `redis-cli` image so we can talk over the ambassador bridge.
122 123
 
... ...
@@ -127,7 +128,7 @@ And get the `redis-cli` image so we can talk over the ambassador bridge.
127 127
 
128 128
 ## The svendowideit/ambassador Dockerfile
129 129
 
130
-The `svendowideit/ambassador` image is based on the `alpine` image with
130
+The `svendowideit/ambassador` image is based on the `alpine:3.2` image with
131 131
 `socat` installed. When you start the container, it uses a small `sed`
132 132
 script to parse out the (possibly multiple) link environment variables
133 133
 to set up the port forwarding. On the remote host, you need to set the
... ...
@@ -155,5 +156,5 @@ case `192.168.1.52:6379`.
155 155
     RUN apk update && \
156 156
     	apk add socat && \
157 157
     	rm -r /var/cache/
158
-    
158
+
159 159
     CMD	env | grep _TCP= | sed 's/.*_PORT_\([0-9]*\)_TCP=tcp:\/\/\(.*\):\(.*\)/socat -t 100000000 TCP4-LISTEN:\1,fork,reuseaddr TCP4:\2:\3 \& wait/' | sh