Skip to main content

Posts

Showing posts from June, 2016

Docker Aha moment

I had read many articles about docker before but today was the day when I realized the aha moment.  I had designed database structure of a new application where different micro-services uses their own schemas and each can be located on its own server depending on the scale requirement. Locally I had kept them on same mysql host but on production it will be used on different Google CloudSQL instances.  The aha moment for me was when I was able to fire up multiple mysql containers and map them to a different port and do end to end testing of my sharding code all on local box. All I had to do was docker run -p 3306:3306 -d  gcr.io/xx-us/mysql:5.6 docker run -p 3307:3306 -d  gcr.io/xx-us/mysql:5.6 docker run -p 3308:3306 -d  gcr.io/xx-us/mysql:5.6 docker run -p 3309:3306 -d  gcr.io/xx-us/mysql:5.6 docker run -p 3310:3306 -d  gcr.io/xx-us/mysql:5.6 ..... and I had many mysql servers ready to be tested.   In the VM world I would not even had dared to start 5 vm on my laptop.