Browse code

Cleanup examples on README

Solomon Hykes authored on 2013/04/19 14:37:45
Showing 1 changed files
... ...
@@ -127,17 +127,17 @@ First run the docker daemon
127 127
 
128 128
 All the examples assume your machine is running the docker daemon. To run the docker daemon in the background, simply type:
129 129
 
130
-   .. code-block:: bash
131
-
132
-      sudo docker -d &
133
-
134
-Now you can run docker in client mode: all commands will be forwarded to the docker daemon, so the client
135
-can run from any account.
130
+```bash
131
+# On a production system you want this running in an init script
132
+sudo docker -d &
133
+```
136 134
 
137
-   .. code-block:: bash
135
+Now you can run docker in client mode: all commands will be forwarded to the docker daemon, so the client can run from any account.
138 136
 
139
-      # now you can run docker commands from any account.
140
-      docker help
137
+```bash
138
+# Now you can run docker commands from any account.
139
+docker help
140
+```
141 141
 
142 142
 
143 143
 Throwaway shell in a base ubuntu image
... ...
@@ -146,18 +146,11 @@ Throwaway shell in a base ubuntu image
146 146
 ```bash
147 147
 docker pull ubuntu:12.10
148 148
 
149
-# Run an interactive shell
150
-# allocate a tty, attach stdin and stdout
149
+# Run an interactive shell, allocate a tty, attach stdin and stdout
150
+# To detach the tty without exiting the shell, use the escape sequence Ctrl-p + Ctrl-q
151 151
 docker run -i -t ubuntu:12.10 /bin/bash
152 152
 ```
153 153
 
154
-Detaching from the interactive shell
155
-```
156
-# To detach without killing the shell, you can use the escape sequence Ctrl-p + Ctrl-q
157
-# Note: this works only in tty mode (run with -t option).
158
-```
159
-
160 154
 Starting a long-running worker process
161 155
 --------------------------------------
162 156
 
... ...
@@ -172,16 +165,16 @@ docker logs $JOB
172 172
 docker kill $JOB
173 173
 ```
174 174
 
175
-Run an irc bouncer
175
+Running an irc bouncer
176
+----------------------
176 177
 
177 178
 ```bash
178 179
 BOUNCER_ID=$(docker run -d -p 6667 -u irc shykes/znc $USER $PASSWORD)
179 180
 echo "Configure your irc client to connect to port $(port $BOUNCER_ID 6667) of this machine"
180 181
 ```
181 182
 
182
-Run Redis
183
+Running Redis
184
+-------------
183 185
 
184 186
 ```bash
185 187
 REDIS_ID=$(docker run -d -p 6379 shykes/redis redis-server)