Docker for 10 things
Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center, VMs, or the cloud. Here are 10 ways where using docker can increase your productivity.
Do you need to quickly try out magento on your local system ? or Mysql for a project ? or most of any open source project, then use docker. This will save you from 30–60 mins each.
Building some source code and don’t have the proper environment ready for it ? Use docker and mount your sources and get docker to build it. Prime example is the docker golang builder.
Are you working with micro-services ? Packaging each service as a docker image and using docker-compose is a great way to emulate a production environment (checkout docker networks). It does take some effort initially, has huge productivity gains in the end.
How can you write automated integration test cases which does not take ages to start running and is also easily managed?
This is not about running test cases inside docker here, but running the test cases against an image. There is a big advantage when you write test cases against a docker image. My test flow runs two docker images (app + db), loads data in MySQL (on start) and hits APIs on the app docker. Checkout this script for a quick example.
You can use the docker image to deploy itself. A lot of major host providers support hosting docker and if you are getting a dedicated node/vm with shell access, things just got a lot easier. Just setup docker and run your image on the port you want.
With docker in deployment, CD becomes as easy as killing the docker container and starting it again after pulling in the new image. There are a lot of options for automating this part and Kubernetes is probably something you have heard of already.
If you expose your app services to multiple tenants (a tenant is a group of users, something like an org), but your app designed in a single tenant approach, using sub-domain + docker can quickly get you to provide multiple-tenancy.
Multiple apps from one machine
This is somewhat related to micro-services point above, but even if you don’t have micro-services and just have services, docker will still be of great use to manage all services on a single machine. You should use folder mount to persist data for each data based docker image.
Docker helps you to horizontally scale easily by just creating another container. This can save you if you are expecting a huge peak traffic. Just add more machines and increase the number of running containers behind the load-balancer.
Share your 10th use case in the comments below. I realise that I only have nine :)