Force Docker to cache directory

Is it possible to force Docker to cache a directory?

I would like to do this because I am using vendoring in Go 1.6 (via Glide) and a majority of my build times are spent fetching the same dependencies as the previous build.

  • How to mount current directory as read-only but still allow changes inside the container?
  • Do you need docker when coding locally with rails?
  • How to prevent binding to docker0 bridge in overlay mode
  • Docker invalid tag value
  • Build multiple images from multiple dockerfile
  • Issue linking containers in Docker using Docker-compose
  • If there is a way of forcing Docker to cache a directory, is there any way to let Docker know when to invalidate the cache (ex., when glide.lock changes)?

  • Can I use Docker simply to set up the general environment of an EC2 instance?
  • Debian : Using a cron task on Docker
  • How does Docker share resources
  • Do you need docker when coding locally with rails?
  • Running a script in docker container and not killing the script when leaving terminal
  • Use Docker to run a build process
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.