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.

  • How to create a Jenkins job and/or user from a dockerfile?
  • Docker - Running nginx as a proxy for Redmine
  • Docker can't connect to the internet from with proxy
  • Docker. Celery and code in different containers
  • Getting Started with EC2 Container Registry
  • Docker run giving different result to docker build (trying to use 32bit image on 64bit host)
  • 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
    Client:
    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
    
    Server:
     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?

    TIA

  • docker build giving unauthorized: authentication required
  • 12factor config approach with Docker
  • Why has Docker volume run out of space?
  • AWS S3 Elastic Beanstalk Docker - /dev/fus: Operation not permitted
  • How to write files from Docker image to EFS?
  • Docker container for google cloudML on compute engine - authenticating for mounting bucket
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.