The main idea is that when someone pushes changes to one of the github repos, we’d want to build a new docker image with that code and push it to our private registry1.
After laying down most of the app, time had come to test the integration with Github’s hooks, and I was left wondering how easy it would have been to test this on my local machine, without having to deploy the app somewhere where it would be publicly accessible.
ngrok to the rescue
Ngrok tunnels traffic from the internet to your local machine through some black magic. Just download it and create a sample NodeJS server on your machine:
1 2 3 4
Running it through
node server.js will, of course, make it accessible at
Now, the magic: run
./path/to/ngrok http 8888
and ngrok will tell you at what public address your server is now
1 2 3 4 5 6 7 8 9 10
http://xxxx.ngrok.io (of course, the address / hash will be
different everytime you launch ngrok) and you will now be able to access
your local service from the internet.
Icing on the cake: now, to test your application, you
can simply point the github hook to
xxxx.ngrok.io and receive
hooks on your local machine.
- As much as I don’t like to re-invent the wheel, the builds on the dockerhub were a bit too slow and using stuff like codeship would have been a bit too expensive, so while we were using the Dockerhub we started developing this tool “for fun and profit” ↩