Caching dependency compilation in Docker build

Do you touch the mix.lock or mix.exs between builds?

From a theoretical point of view, your file should work.