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

Dockerfile:

  • difference between cgroups and namespaces
  • How to create a graph database in TinkerPop/Rextser using the Rexster Docker image and Bulbs?
  • Symfony 3 with Docker and nginx
  • how to build docker containers for different modules
  • docker npm install Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
  • docker on ubuntu 16.04 OCI error when launching 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 dockerize maven project? and how many ways to accomplish it?
  • How to set up a LAMP stack in Debian containers using Docker Compose?
  • docker copy file from one container to another?
  • How to use properly centos dockerfile with ubuntu host?
  • how to run two microservices on same network?
  • Cant access my Docker DotNet core website
  • 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.