Browse code

add a documentation note on backslash usage in shell form of RUN

Signed-off-by: Amen Belayneh <amenbelayneh@gmail.com>

Amen Belayneh authored on 2015/09/12 16:26:14
Showing 1 changed files
... ...
@@ -311,6 +311,12 @@ commands using a base image that does not contain `/bin/sh`.
311 311
 > If you want shell processing then either use the *shell* form or execute 
312 312
 > a shell directly, for example: `RUN [ "sh", "-c", "echo", "$HOME" ]`.
313 313
 
314
+> **Note**:
315
+> If you choose to use the *shell* form, any time you want to continue a single
316
+> `RUN` instruction onto the next line, it has to be ended with a backslash `\`.
317
+> For example,  `RUN /bin/bash -c 'source $HOME/.bashrc ;\` then on the next
318
+> line ` echo $HOME '`.
319
+
314 320
 The cache for `RUN` instructions isn't invalidated automatically during
315 321
 the next build. The cache for an instruction like 
316 322
 `RUN apt-get dist-upgrade -y` will be reused during the next build. The