Docker: simplifying cross-platform development

Development with Docker and containerize applications

Docker is an open source project that has been helping organizations to develop and deploy their applications in a centralized and scalable architecture. The key to making this possible is the concept of containerized the applications and all its dependencies. As a result, developers can build a variety of specific environments, including exactly what they need to run their applications, even if the applications are cross-platform. In addition, this architecture is scalable, because developers and IT operators can add new resources whenever they need them, according to the software requirements that is being developed.

Quoted below you can see a brief history of Docker:

[1]Solomon Hykes started Docker in France as an internal project within dotCloud, a platform-as-a-service company, with initial contributions by other dotCloud engineers including Andrea Luzzardi and Francois-Xavier Bourlet. Jeff Lindsay also became involved as an independent collaborator.Docker represents an evolution of dotCloud’s proprietary technology, which is itself built on earlier open-source projects such as Cloudlets.

Using Docker, we can package a wide range of applications (independently of programming language, platforms, and other technologies) and all its dependencies in containers. The application in the container can run on any server, centralizing and simplifying the process of development and deployment.

Besides that, this makes the process of deployment more flexible and portable, isolating the applications in a centralized and controlled environment. This is very useful for both Development Teams and IT Operations Teams (see the concepts of DevOps in this article).

Quoted below you can see some definitions about the concepts of this project from Docker web pages and Docker Ebook:

[2]Docker is one of the most successful open source projects in recent history, and organizations of all sizes are developing plans around how to containerize their applications.

[3]Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

Docker and the development of cross-platform applications

What are cross-platform applications?

Cross-platform applications are software which needs to work on multiple operating systems but having only a single source code base. This is a development architecture strategy to avoid the need to have an application with many versions of source code to run on various operating systems (each one to run on a specific platform).

For example, a cross-platform application may run on Microsoft Windows (on the x86 architecture), Linux (on the x86 architecture) and Mac OS (on either the PowerPC or x86-based Apple Macintosh systems). If the developer needs to create a cross-platform application, using a traditional approach, it would be necessary having at least three different environments.

It is in this complex scenario that the Docker can help developers and IT operators with a containerized development architecture, simplifying the process of developing, testing, building, deploying and maintaining the applications.

How can Docker help developers to simplify the development of cross-platform applications?

One of the most benefits from Docker is the cross-platform portability. Developers who need to create new applications to run on a different operating system will be benefited using Docker. The productivity will increase and a complex architecture can become simple since all the application requirements and dependencies will be available in the same container.

The main goal of the Docker for developers allows the development of multi-platform applications in a common way of productivity that enables the development of applications using a common syntax that run the same way on a various operating system, decreasing the inherent risks of a complex multi-platform architecture and its dependencies.

Developing with containers is a little different from a traditional development approach, but most of the time it is not so different from the way that we used to develop traditional applications (write and run the code and the tests).

In the containerized development approach, you do not have a development environment that is persistent and constantly being evolved, even this is not a recommended strategy. Instead of having a virtual machine configured for each device where you need to run the code, you will create a lightweight virtualization layer called “container”.

Containers are created from images, using a host as a pattern to replicate the images. The images are created from templates, that have the patterns used to creating the correct environment for your application, including all dependencies.

An image includes all application needs and its dependencies. In this way, when you run a specific container, everything related to the application needs to start and run correctly will be available, avoiding wasted time (and money) to set up the correct environment. This condition saves time not only of the Development Team but also the time of the Operations Team (DevOps approach).

For bigger dependencies, that would usually be separate processes, you can split those out into additional containers to simplify the architecture.

Docker and DevOps

DevOps is a concept that is rapidly spreading throughout the IT community. It is the practice of IT operations teams and development teams to participate together in all process of the lifecycle of applications, beginning with design and development through the production deployment and support of the application.

From the above definitions of Docker listed in this article, it is evidently clear that Docker can aid in the process of DevOps. Nowadays, a lot of organizations are looking for DevOps initiative, looking for agility in TI process, and the Docker architecture has helped to approach the Development Teams and the IT Operations Teams.

Quoted below you can see how Docker approach and tools can help in the DevOps initiative:

[4] Docker’s enterprise tool, Docker Datacenter, delivers a Containers as a Service (CaaS) environment that deploys on-premises and is chock full of enterprise-grade security feature like role-based access controls, image signing and image scanning giving IT operations teams ability to secure and manage their environment. The Docker CaaS platform enables developers to build applications in a self-service manner and select from image content that the IT operations team has deemed okay for developer use. Developers can then use these images to create new applications, quickly and securely.

Conclusion

Application containerization and Docker are powerful development and infrastructure architecture and tools, mostly for complex IT environment running cross-platform applications. If you have plans to move to this architecture in the future, it is strongly recommended to begin in the development environment and migrate to production only when the development be very stable. Do not forget that the development and infrastructure teams should be able to work with this architecture.

This approach is highly recommended for IT environments where the goal is to increase the flexibility and agility to develop and deploy cross-platform applications.

Reference & quotes

Quotes

[1] Wikipedia website: http://en.wikipedia.org/wiki/Docker_(software)

[2] EBook: Docker for the Virtualization Admin

[3] Docker Web Page: http://www.docker.com

[4] Docker Web Page (DevOps): http://www.docker.com/use-cases/devops

References

Wikipedia website: http://en.wikipedia.org/wiki/Docker_(software)

InfoWorld website: Docker goes native for Windows and Mac

DZone website: Using Docker to Build a Cross-Platform