我已经阅读http://docs.docker.com/engine/reference/builder/#add但是我遇到了一个问题。 我想把本地目录复制到docker /user/local/
我试过了:
ADD go /usr/local/和:
ADD /go/ /usr/local/也:
RUN chmod 0755 /usr/local/go/src/make.bash但是,我看到以下错误消息/usr/local/go/src/make.bash: No such file or directory但是本地go目录包含make.bash 。
I have read http://docs.docker.com/engine/reference/builder/#add however I met a problem. I want to copy the local directory go to docker /user/local/
I tried:
ADD go /usr/local/and:
ADD /go/ /usr/local/also:
RUN chmod 0755 /usr/local/go/src/make.bashHowever, I see the following error message /usr/local/go/src/make.bash: No such file or directory but the local go directory does contain make.bash.
最满意答案
ADD go /usr/local/将您的本地go目录的内容复制到您的码头图像的/usr/local/目录中。
要将目录本身复制到/usr/local/ use中:
ADD go /usr/local/go要么
COPY go /usr/local/go ADD go /usr/local/will copy the contents of your local go directory in the /usr/local/ directory of your docker image.
To copy the go directory itself in /usr/local/ use:
ADD go /usr/local/goor
COPY go /usr/local/go更多推荐
发布评论