CONTAINERIZE YOUR WEB DEVELOPMENT: HOW DOCKER IS SOLVING REAL WORLD PROBLEMS FOR WEB DEVELOPERS!

By April 27, 2016 Development, Website

Working in web development? Well, then you’ve probably heard about Docker and its recent developments before. Many people call it hotter than hot. Docker containers can be a true productivity booster for your next web apps. As a web developer it’s not that easy to understand the essence of Docker.

This is why I’d like to take a look at the Docker containers and show you some real-world problems Docker is solving for web developers.

CONTAINERIZE YOUR WEB DEVELOPMENT: HOW DOCKER IS SOLVING REAL WORLD PROBLEMS FOR WEB DEVELOPERS!

Working in web development? Well, then you’ve probably heard about Docker and its recent developments before. Many people call it hotter than hot. Docker containers can be a true productivity booster for your next web apps. As a web developer it’s not that easy to understand the essence of Docker.

This is why I’d like to take a look at the Docker containers and show you some real-world problems Docker is solving for web developers.

docker for web developers

What is Docker?

Docker is basically an open source tool for running isolated containers on Linux making the deployment of apps inside containers faster. Docker creates portable, self-sufficient containers from any application.

The same container that the developer builds and tests on his PC, can run in production, on VMs, in the cloud and a lot more places.

what is docker? How to use it for web developers

You can run a single service per container, e.g. one container for your MySQL, one container for your Apache, and one container for your WordPress installation.

Otherwise you can put a whole application stack in one container as well. There’s no right or wrong about this.

Docker containers vs. VMs

The ability to separate an application from the underlying Linux operating system is very attractive. Comparing Docker containers to VMs is a valid thing, although Docker containers do not replace VMs. Virtual machines basically have a full operating system with its own memory management, device drivers, etc. In contrast, Docker containers share the host’s OS and are therefore much easier to manage.docker containers vs VMs in web development

(source: docker.com)

Container & Container-as-a-Service

Containers have been around for quite a while.  Although it never really became something like an “industry standard”, Docker made it all possible. With a wide range of support and easy-to-learn and -use containers, Docker is here to stay.

Docker is basically built on top of LXC (Linux Containers). It’s definitely not a replacement for LXC, instead Docker offers some high level features on top of LXC, such as versioning and offers portable deployment across machines. I’d like to recommend this stackoverflow thread.

The growth of the Container-as-a-Service business is immense. At the beginning of 2015, Docker published an infographic displaying the growth of docker container downloads, the number of applications bound up in Docker containers and some other metrics.

(the entire infographic can be found here: http://venturebeat.com/wp-content/uploads/2015/01/Docker_Infographic_FINAL.jpg)

Real-world use cases for web developers

Docker is basically designed in a way that it can be used in many different use cases. Besides the mentioned use cases on docker.com, I’d like to take a look at the following use cases where the technology of Docker provides a great, consistent environment.

Big community around Docker

The great thing about Docker are it’s ready-to-go containers. With its growing community of developers, there are thousands of ready-to-go containers for popular applications like MySQL or WordPress.

If you want to run WordPress for example, you can download it from the Docker Hub and run it with this single line of code:

docker run –name some-wordpress –link some-mysql:mysql -d wordpress

Big win for local development

As a web developer you might be developing on your local engine. Minimizing the differences between your local environment and production help us to avoid last minute changes because of configuration differences.

Working with Docker containers on local environment is a true productivity booster and definitely saves you some last minute hassle.

Rapid deployment

We’ve seen some fantastic journey in the last decades. From real hardware to virtual servers to Docker. Setting up new hardware resources probably took a couple of days. With virtualization it went down to just a couple of minutes.

With Docker, you can have everything up-and-running within seconds. By simply creating a container and not booting up an OS, we definitely see some time saved.

docker for web developers - rapid web development

(source: slideshare)

App isolation for safe sandboxing

With Docker you basically run one application or process per container. Containers take advantage of the ability to create isolated environments. Each container is assigned its own runtime environment and every single container receives its own network stack and process space.

If you want to install different versions of python or any other library, Docker containers are your solution. You can simple install a library in a container, compare it with a different library version from another container, play around with it and throw it away afterwards without any risk.

Security benefits of Containers

Running various containers can provide some security benefits. By running applications on various containers, each container only has access to the ports and files explicitly exposed by the other container.

Further on, containers offer a higher level of control on what data and software are installed. Some malodorous script run in one container, won’t affect any other container.

Updates are an important security issue. Running applications in a Docker environment, makes the process of updating less painful.

Simplified testing

Setting up testing environments with Docker containers is super-easy. Thinking about all those different frameworks and databases, as well as different versions of python for example, testing in a virtualized environment has become a true challenge.

By setting up different Docker containers for testing, you can dramatically speed up your test suite by separating different versions in different containers.

test environment setup for docker web development

Easy configuration

One of the many reasons for its increasingly usage of Docker containers, is definitely the simple and easy-to-setup configuration. With VMs it’s possible to run any application with its own configuration on top of your infrastructure. Docker basically provides the same capability without the overhead of a VM. However, Docker containers cannot replace virtual machines. This lets you decouple the infrastructure requirements from the application environment.

Dockerize your web development?

Containerizing your applications will not only make your deployment faster, but also a lot easier. The gained portability and flexibility with Docker containers is immense. As a web developer you can supercharge your development environment using Docker.

Prefer a quick summary of Docker? No worries, we got you covered.

Source: UserSnap

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.