在构build上下文中,Dockerfile COPY / ADD文件失败
dockerfile COPY命令失败,尽pipe源文件存在于构build上下文中。
$ docker --version Docker version 1.4.1, build 5bc2ff8/1.4.1
Dockerfile:
$ cat Dockerfile FROM centos COPY "test", "/"
目录内容:
$ ls -Al total 4 -rw-rw-r-- 1 nottingham nottingham 29 Apr 1 14:21 Dockerfile -rw-rw-r-- 1 nottingham nottingham 0 Apr 1 14:26 test
build立输出:
$ docker build -t nottingham/test . Sending build context to Docker daemon 2.56 kB Sending build context to Docker daemon Step 0 : FROM centos ---> 88f9454e60dd Step 1 : COPY "test", "/" INFO[0000] "test",: no such file or directory
使用COPY [src,dest]表单或ADD命令时会发生类似的错误。 有任何想法吗?
删除逗号和引号。 使用:
FROM centos COPY test /