June 25, 2017

Will serverless computing eventually replace Docker? That’s the conclusion the internet seems to be drawing. But it’s the wrong way to think about the relationship between Docker containers and serverless computing.

Serverless computing refers to platforms that allow an organization to run a specific piece of code on-demand. It’s called serverless because the organization does not have to maintain a physical or virtual server to execute the code.

Platforms including AWS Lambda, Azure Functions and (for an on-premises version) Fission.io make it readily available to organizations today.

Predicting the Doom of Docker

Some folks see serverless computing as a technology that will kill Docker—or at least sharply reduce the use cases for Docker containers.

Because of serverless computing, “container will see workloads shrink,” one observer writes. Another predicts that it will usher in “a post-virtual machine, post-container world.”

Why do some people see the serverless computing revolution as a threat to Docker? Mostly because they perceive serverless functions as an even more efficient way to deploy application code than Docker containers.

In one sense, it doubles down on the efficiencies that Docker containers offer. Docker containers reduce the management burden associated with virtual machines. They also provide more scalability.

Serverless functions take things a step further. They eliminate the need to set up and manage any type of infrastructure, beyond the very basic task of loading the code for serverless functions into the serverless platform.

Why Serverless Computing Won’t Kill Docker

Still, I don’t see serverless computing as a big threat to Docker containers. Although it offers important advantages Docker lacks in certain situations, for the most part serverless computing and Docker containers are different sorts of technologies.

In other words, their functionality overlaps to only a limited extent. You can’t use serverless functions to run an SSH server, for example.

Nor can serverless computing, on its own, be used to construct all of the infrastructure you need to deploy a web application. It might come in handy for executing parts of your code within the web application, but serverless functions won’t work well for hosting services that need to be constantly turned on and listening for connections.

After all, the essence of serverless functions is that they run only when they need to. That’s how they add efficiency to your workloads: They obviate the need to maintain a server permanently while only using it occasionally. If your serverless functions are running non-stop, then they’re defeating their own purpose.


Simply put, it’s wrong to think of serverless computing and Docker as competing technologies.

Yes, serverless computing is poised to be a key innovation that will help usher in the next generation of infrastructure technology. Serverless functions will be the shiny, new thing in your stack after Docker containers have gone mainstream and lost their luster.

But you simply can’t use serverless functions to accomplish most of the tasks you do with Docker containers, and vice versa. You’ll need both.

Christopher Tozzi

Christopher Tozzi has covered technology and business news for nearly a decade, specializing in open source, containers, big data, networking and security. He is currently Senior Editor and DevOps Analyst with Fixate.io and Sweetcode.io.

  • Clay Smith

    Nice article—agree it’s complimentary technology. Not to be the “well, actually…” person, but turns out you can run an SSH server in serverless functions, it’s a project I recently open-sourced and wrote about here: https://medium.com/clog/ssh-ing-into-your-aws-lambda-functions-c940cebf7646

  • Tim Gent

    Interesting article but I think it’s maybe overstated.

    “but serverless functions won’t work well for hosting services that need to be constantly turned on and listening for connections” – what’s an example? Aren’t serverless functions effectively doing this as they will respond to such connections so are in effect constantly listening? Or is the concern the response time?

    You also mentioned the ssh server example, though many companies I know are now using a PaaS, be it internal or external, so people deploying to this would never ssh, and it should be relatively rare even for the platform team.