cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
730
Views
0
Helpful
1
Replies

Copy directory to other directory at Docker using ADD command

rohitbhat55843
Level 1
Level 1

So I have been working on my project where I learned from DevOps training course with the Docker documentation:  http://docs.docker.com/engine/reference/builder/#add, but I am still getting an error somehow, I wish to move my local directory go to the directory in docker: /user/local/

I used the below command for this purpose :

ADD go /usr/local/

which didn't work, so I tried the below command :

ADD /go/ /usr/local/ 

That also didn't run, I tried using the chmod command as given:

RUN chmod 0755 /usr/local/go/src/make.bash

I still keep getting an error  [ /usr/local/go/src/make.bash: No such file or directory but the local go directory does contain make.bash. ]

 

1 Reply 1

The command copies files/directories to a file system of the specified container. It includes the source you want to copy ( <src> ) followed by the destination where you want to store it ( <dest> ). If the source is a directory, ADD copies everything inside of it (including file system metadata).