File not getting updated when using “docker cp”

I am trying to use docker cp to copy .class files from my host into the container. I am using the following command:

docker cp foo.class container:/path/foo.class

I am doing this when the server running inside the container is shutdown.

  • when we run the hello-world image its throws the connection refused error message
  • Docker: Connect via SSH to Remote MySQL server
  • docker-engine runlevel:/var/run/utmp: No such file or directory
  • Installing systemd inside a ubuntu14.04 docker container - Is it possible?
  • Unable to push image to docker hub
  • Docker pull fails to lookup on (cannot unmarshal DNS message)
  • However, I am seeing that the foo.class isn’t getting updated with my latest file and if I try to rm the file I get a

    rm: cannot remove foo.class: Stale file handle

    Here is my docker version (Docker for Mac):

    docker version
    Version:      1.13.0
    API version:  1.25
    Go version:   go1.7.3
    Git commit:   49bf474
    Built:        Wed Jan 18 16:20:26 2017
    OS/Arch:      darwin/amd64
     Version:      1.13.0
     API version:  1.25 (minimum version 1.12)
     Go version:   go1.7.3
     Git commit:   49bf474
     Built:        Wed Jan 18 16:20:26 2017
     OS/Arch:      linux/amd64
     Experimental: true

    Anyone seen this happen?


  • How can I call docker API from container (Docker for Mac)
  • access docker VM in private network (docker-machine)
  • Why does creating a file inside a docker-machine VM result in permission denied?
  • Auth0 OWIN API not validating JWT token when published via Docker Container on AWS EC2
  • SonarQube with own Profile in Docker
  • How to circumvent “Read-only file system” error on Docker version 0.11 or greater when running sysctl -w during an image build?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.