Simply resets the mtime (modified time) metadata on your source files to a set datetime before building the image with docker.
Makefile Shell
Latest commit e359cd2 Oct 15, 2015 @mixxorz Merge pull request #3 from mixxorz/dont-touch-symlnks
Don't touch symlinks
Permalink
Failed to load latest commit information.
.editorconfig
.travis.yml
LICENSE.txt
Makefile
README.md Add docker version warning in README.md Oct 15, 2015
plugin.toml
pre-build-dockerfile

README.md

dokku-docker-reset-mtime

You don't need this plugin if you have docker 1.8.x +

Simply resets the mtime (modified time) metadata on your source files to a set datetime before building the image with docker. I made this to work around docker's caching system taking into account the modified time when checking if a file has changed or not. If the mtime changed, even if the file is exactly the same, the cache will be invalidated. This is annoying because git inherently modifies the mtime of all the files when you clone, pull, etc.

This plugin shouldn't be needed when version 1.8.0 of docker gets released and dokku makes the switch, but for now, here we go.

The solution is based off this StackOverflow question.

Here's the relevant Docker PR on the issue.

requirements

  • dokku 0.4.0+
  • docker 1.6.x

installation

# on 0.3.x
cd /var/lib/dokku/plugins
git clone https://github.com/mixxorz/dokku-docker-reset-mtime.git reset-mtime
dokku plugins-install

# on 0.4.x
dokku plugin:install https://github.com/mixxorz/dokku-docker-reset-mtime.git  reset-mtime

That's all folks.