Browse code

remove the duplicate line from doc and rebase with master for 'example of ADD and COPY with special characters file name'

Signed-off-by: Foysal Iqbal <foysal.iqbal.fb@gmail.com>

Foysal Iqbal authored on 2017/03/22 04:22:29
Showing 1 changed files
... ...
@@ -803,6 +803,14 @@ the source will be copied inside the destination container.
803 803
     ADD test relativeDir/          # adds "test" to `WORKDIR`/relativeDir/
804 804
     ADD test /absoluteDir/         # adds "test" to /absoluteDir/
805 805
 
806
+When adding files or directories that contain special characters (such as `[`
807
+and `]`), you need to escape those paths following the Golang rules to prevent
808
+them from being treated as a matching pattern. For example, to add a file
809
+named `arr[0].txt`, use the following;
810
+
811
+    ADD arr[[]0].txt /mydir/    # copy a file named "arr[0].txt" to /mydir/
812
+
813
+
806 814
 All new files and directories are created with a UID and GID of 0.
807 815
 
808 816
 In the case where `<src>` is a remote file URL, the destination will
... ...
@@ -915,6 +923,14 @@ the source will be copied inside the destination container.
915 915
     COPY test relativeDir/   # adds "test" to `WORKDIR`/relativeDir/
916 916
     COPY test /absoluteDir/  # adds "test" to /absoluteDir/
917 917
 
918
+
919
+When copying files or directories that contain special characters (such as `[`
920
+and `]`), you need to escape those paths following the Golang rules to prevent
921
+them from being treated as a matching pattern. For example, to copy a file
922
+named `arr[0].txt`, use the following;
923
+
924
+    COPY arr[[]0].txt /mydir/    # copy a file named "arr[0].txt" to /mydir/
925
+
918 926
 All new files and directories are created with a UID and GID of 0.
919 927
 
920 928
 > **Note**: