Shipping containers

How Will Docker (and Containers) Improve The Future of Web Development?

The short answer? It already is! And along with that, you may be asking yourself the following questions:

  • "Why aren’t we using a Docker?"
  • "Why don’t I know more about it?"

Rest assured, Docker is about to blow up even more than it already has—and in very short order! In preparation for this, I’d like to share with you some knowledge I’ve gleaned working closely with Docker, applying it to our work as a digital agency, and thinking about it in great depth. You too can be a Docker pro before you know it.

The nitty gritty

Docker is being heralded as the next wave of computing, right? What does that mean for your work? How do you quickly wrap your mind around its value proposition? If you make the leap of faith to the container-side, how do you even decide if it’s worthwhile? And before you make that leap, what steps do you need to take to prepare?

I find that people don’t have the easiest time absorbing the concept. It just sits there in the corner of the brain as this “abstract conversation piece” that everyone is waiting for more information on before proceeding. And I’d really like to change that.

When the idea of a virtual machine was first introduced, it wasn’t quite as big of a leap, because it was an extension of ideas most IT professionals already inherently understood. However, in discussion with folks on my team—and even sharp technology leaders in our space—it seems like some people simply can’t wrap their minds around it.

That said, there’s definitely a learning curve—but have faith. Once you get past the initial abstractions, I believe you’ll quickly see why two-out-of-three companies that consider Docker, go on to adopt it. The remaining third either take a “wait-and-see” stance or don’t feel they sufficiently understand it well enough to move forward. Either way, they are just pushing a decision about it out into the future instead of leveraging the benefits of the technology here and now (and well before your competition does so, giving you a competitive advantage).

Complicating matters further, the word “containers” has become a buzzword. The major hosting platforms – like AWS, Rackspace, and Google – are all moving toward “providing services to support containers.” I submit this to you now for consideration: Don’t fall into the trap they are setting. Educate yourself on containers and learn more about Docker so you can better leverage the technology going forward.

Before we dig into what Docker is, let’s discuss the most important reasons to adopt it.

In cloud hosting there are two major spheres: virtual servers and customized platforms like Heroku. Either of these should enable you to deploy and scale your app.

I actually happen to think Heroku is pretty awesome, but it does have some issues. First, it can be costly compared to a basic virtual machine. More critically, it locks you into their platform to a certain degree. Local development might be inconsistent compared to where you push your code. Even when you opt for virtual solutions like AWS, Digital Ocean, or Rackspace, you can get locked into their way of doing things. Often, you wind up having to factor in some complex relationships between virtual servers and your operating system that are hard to scale and maintain.

Docker frees you from these limitations by allowing you to run, develop, and improve your apps without needing a secondary, redundant “Hypervisor” OS on top of the main OS. Your test environment now becomes more independent. You can move your platform anywhere and even launch your app across multiple cloud providers. That prevents you from being locked into a platform and can help protect you in the event that your chosen provider experiences an outage.

So let’s get to it. What is a Docker container?

A useful way to imagine how Docker containers work might be to imagine a cross section of a large freighter ship. This applies to netops and development in several really interesting ways.

The great thing about these ships is that they use large, standardized containers to carry cargo. Standardized shipping containers bestow both practical and economic advantages just as do Docker containers:

  • Each container is the same size — so they easily stack and lock into place on the ships. When you need to load and unload a ship quickly, you don’t want to worry about trying to optimize space with varied shapes and sizes. You want a consistent, one-size-fits-all solution.
  • Each container features all the same physical attachments so a crane on any dock worldwide can efficiently move them between ships and trucks designed to handle them.
  • These containers also feature the same life support system options. So if the cargo in a certain container requires electricity, heating, or cooling — it can be connected in a consistent manner. Hoses and cables all fit right into place. Meanwhile, power and communication run straight up from the hull of the ship.

As I go through these benefits, I’m sure you can imagine how they apply analogously to Docker containers. They are essentially the same benefits, but applied to software and operating systems instead.

But, you may ask, don’t virtual machines do the same thing? Wouldn’t the deck of that shipping vessel serve in a similar role to the containers on its deck? This is probably the most common question I get when trying to convey what containers can do. “Why can’t I just configure a virtual machine to run the applications I need, save the image and launch additional VMs as needed? Or use Chef to build and configure the virtual machine?”

Technically you can. That's exactly what many of us have been doing the past several years. But, from a technical perspective, virtual machines require a lot of extra overhead just to keep themselves going. Essentially, you have added complexity that is compromising efficiency. They manage memory, processes, users, services, and more — all of which can be avoided using isolated containers. But going back to the ship analogy — what’s really happening is, you’ve added another layer between the infrastructure (or hull of the ship) and the containers. Docker enables you to service the containers more directly, with less complexity.

So now, instead of trying to build one-off, custom ships, each packed with various types of cargo, we build one kind of ship that will service all containers. Virtual technology is still very important, but it should be focused on facilitating safe shipment of container cargo in a consistent manner. Docker allows you to dispense with the “Hypervisor” layer, so the “containers can run directly on the metal.” And, when containers are closer to the actual infrastructure, it allows your developers to “think more operationally.” (as the CTO of Joyent, Bryan Cantrill, put it).

Also, no matter what the external factors are – the OS, number of users, etc. – the server stores and services the containers in a much more unified and consistent manner. Essentially, it allows that same container to run on any server in any fleet around the world.

Over the next few months we’ll continue to dive into Docker to make it practical for your company—and help you implement it at its fullest potential.

If you’re eager to learn more now, this video offers more on Docker (and not in a boring unfun way) along with some of the interesting history behind it. Let’s run containers on bare metal already!