Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (2.3k points)

So I have been working 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. ]

Can someone help me out?

closed

1 Answer

+1 vote
by (6.9k points)
selected by
 
Best answer

Use this command :

ADD go /usr/local/

This command will basically copy all the content from the directory go into /usr/local/

If you wish to copy the directory itself use this command

ADD go /usr/local/go

or

COPY go /usr/local/go

Hope this helps


Hey also , it looks like you could use some help in docker, check out this docker training course . You can get help from trained professionals.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...