How to Build Like Medistrano
By simulating Medistrano's Docker image build process on your own workstation, you get immediate feedback, plus use of the local Docker cache. This can help catch or reproduce problems much more quickly than by repeatedly committing changes to GitHub, then asking Medistrano to perform a build. Here are some instructions that should help you accomplish that.
docker build in your app's checkout directorty, you should make sure you can authenticate to any hosts that might require access during the build process.