Dockerfile COPY / ADD fails for file in build context

The dockerfile COPY command is failing despite the source file existing in the build context.

$ docker --version
Docker version 1.4.1, build 5bc2ff8/1.4.1


  • Docker daemon config file on boot2docker / docker-machine / Docker Toolbox
  • Docker Windows bridge ip conflict
  • running docker from gradle: cannot pull image
  • How to access JMX interface in docker from outside?
  • Creation of Informix Docker Container freezes
  • Cannot open firefox in Docker container
  • $ cat Dockerfile
    FROM centos
    COPY "test", "/"

    Directory contents:

    $ 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 output:

    $ 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

    Similar errors occur when using the COPY [src, dest] form or the ADD command. Any ideas?

  • How to pass argument to Docker file ( specifically to FROM instruction)
  • docker RUN append to /etc/hosts in Dockerfile not working
  • How do I run a sql file of inserts through docker run?
  • Docker passing environment variable
  • Remote access to container
  • docker Mule-server curl: (56) Recv failure: Connection reset by peer
  • One Solution collect form web for “Dockerfile COPY / ADD fails for file in build context”

    Remove the comma and quotes. Use:

    FROM centos
    COPY test /
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.