Cover photo credit: Docker 101: Introduction to Docker webinar recap by Jenny Fong
Each Docker Container is essentially an isolated software-defined environment. Containers are used to help solve the problem of “Well it works on my machine.” Prior to the rise in popularity of containers, developers were using Virtual Machines to test code in a consistent environment. Virtual machines are similar to containers, as they contain an application and its dependencies, but additionally include a guest operating system and require a Hypervisor.
While Virtual Machines offer a lot of benefits, they are slower to boot up than containers because of the added cost of running an operating system in each virtual machine. Though Docker is not the first company to offer a tool for containerization, it seems to have come at the right time (2013). Developers were looking for an alternative to Virtual Machines as DevOps and the Microservices architecture rose in popularity. Docker containers meet that need and are supported in a lot of other third-party applications and services (AWS, Travis CI, Jenkins, etc.).
Docker containers are useful for microservices because they offer an isolated and uniform environment for each microservice to run in and can be spun up quickly. This is useful for microservice based applications because they rely on several independent running processes. If one of the microservices goes down, it does not bring down the whole application and can easily be replaced with another container running the same microservice.
There are quite a few developer tools available for working with Docker Containers. One of the most popular solutions is Docker Compose. Docker Compose uses a .yml to define a multi-container configuration. This Docker Compose .yml file is used to spin up multiple containers at one time. This simplifies the process of running and testing your Microservices application.
Currently, Docker Compose is one of the most popular options for spinning up multiple containers locally. However, because each docker image must be built from a Dockerfile, developers who want to use Docker Compose to spin up containers locally must recreate the docker images each time there are changes to code for a given microservice. When working with teams of many developers who may not work on every repository daily, it can become tedious to make sure that they are testing local code against the most recent versions of the other microservices that rely on that microservice.
DockerLocal is an Electron application that aims to fill this need for a way to dynamically create docker compose files. Once developers sign in with Github, DockerLocal allows developers to create projects for each microservice application they are working on. Developers can then choose the github repositories associated with that project to clone the latest version of each repository. DockerLocal then creates a Docker Compose .yml file with only the microservices you’re not currently working on locally. DockerLocal is launching today and is available for download and contributions here. Have any feedback? Let us know in the comments below.