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.

  • Synced Folder Error with Docker Provider on Vagrant
  • Docker fails pulling repository with error: Too Many Requests (HAP429)
  • Docker and Mysql: libz.so.1: cannot open shared object file: Permission denied
  • Best practices for debugging vagrant+docker+flask
  • envsubst command getting stuck in a container
  • Running docker without sudo on Ubuntu 14.04 [closed]
  • 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

  • Node version not upgrading
  • Docker linked containers, Docker Networks, Compose Networks - how should we now 'link' containers
  • Fluent docker tail vs docker fluentd logging driver
  • Simple docker command does not work: x509: cannot validate certificate
  • Celery doesn't work on docker
  • Dynamic Scalable and adaptive architecture
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.