问题描述
我已阅读 http://docs.docker.com/engine/reference/但是我遇到了一个问题。我想将本地目录 go
复制到docker / user / local /
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/
我试过:
ADD go /usr/local/
和:
ADD /go/ /usr/local/
还:
RUN chmod 0755 /usr/local/go/src/make.bash
但是,我看到以下错误消息 /usr/local/go/src/make.bash:没有这样的文件或目录
,但本地 go
目录确实包含 make.bash
。
However, 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/
将在 / usr / local /
目录中复制本地 go
目录的内容您的码头图像。
will copy the contents of your local go
directory in the /usr/local/
directory of your docker image.
要将 go
/ usr / local / 使用:
To copy the go
directory itself in /usr/local/
use:
ADD go /usr/local/go
或
COPY go /usr/local/go
这篇关于使用ADD命令将目录复制到Docker的其他目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!