Why does docker mount a file with a numeric value as a directory?

Running a docker run command with:

-v=/path/to/file/name0.conf:/etc/name.conf

was resulting in the docker container not being started:

  • Docker - Properly Mounting Host Directory in Docker Container (Windows)
  • Using /container/id/top command for docker api
  • Can not deserialize instance of int out of VALUE_FALSE token while readng docker info client.infoCmd().exec();(docker java api version 0.10.4)
  • Building a custom Node-RED image
  • Jenkins on GCE not building
  • Cannot access tomcat8 server running in docker container from host machine
  • docker: Error response from daemon: Cannot start container <hash>: [9] System error: not a directory.
    

    Why is this file not mounting in Docker?

    I can make the name nameA.conf and mount it fine. The file nameA.conf and name0.conf are identical (verified with diff), have the same rights (verified with ls -l).


    docker --version
    Docker version 1.10.1, build 9e83765
    

  • What's the best practice to send logs to graylog from a JVM application which runs within a docker container?
  • alpine linux: pmap output not showing RSS
  • removing what was added in previous layer in docker
  • Why do my volumes sometime not get mounted in my Docker container when using fig?
  • Why does Docker run so many processes to map ports though to my application?
  • Docker - MySQL container does not keep running
  • One Solution collect form web for “Why does docker mount a file with a numeric value as a directory?”

    Docker does not mount files ending in numeric characters in their name correctly into containers.

    It converts the file into a directory because of the 0 in the name – this can be reproduced with different filenames that are similar and have numeric characters.

    The solution is to use non-numeric characters in the filename locally.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.