DEV Community

Kirill Tolmachev
Kirill Tolmachev

Posted on

Docker Is the New jQuery: Everyone Uses It, Nobody Understands It

Docker Is the New jQuery: Everyone Uses It, Nobody Understands It

Remember when jQuery was everywhere? Every website, every tutorial, every bootcamp graduate's first instinct was to $() their way through problems. Half the developers using it couldn't explain what the DOM was, but they sure knew how to copy-paste that CDN link. Today, Docker has achieved the same dubious honor.

I've watched teams Dockerize their Hello World applications while running monolithic databases on bare metal. I've seen developers spend three days debugging container networking for a project that could run perfectly fine as a systemd service. We've created a generation of developers who know more about Dockerfile syntax than they do about process management.

The Cargo Cult Problem

Docker isn't inherently bad. Neither was jQuery. Both solved real problems and democratized complex concepts. jQuery made DOM manipulation accessible when browsers were inconsistent nightmares. Docker made deployment consistent when servers were snowflake disasters.

But somewhere along the way, we stopped asking "why" and started assuming "must."

I worked on a project where the team Dockerized a static file server. Not a complex application. Not even a dynamic site. Static HTML files served by nginx. When I asked why we needed containers for this, the response was genuinely puzzled: "How else would you deploy it?"

This is cargo cult programming. Going through the motions without understanding the principles.

When Docker Makes Sense (And When It Doesn't)

Here's what Docker actually solves:

Environment consistency: Your application runs the same way across development, testing, and production. This matters when you have complex dependencies or need specific system libraries.

Resource isolation: Multiple applications can share the same host without stepping on each other. Critical for multi-tenant environments or when you're running untrusted code.

Scaling orchestration: Kubernetes and similar platforms need standardized deployment units. Containers provide that abstraction.

Dependency management: Complex applications with conflicting system requirements become manageable.

Now here's when Docker is overkill:

  • Single-purpose VMs where you control the entire stack
  • Applications with simple, standard dependencies
  • Development environments where you're the only user
  • Stateful services that need persistent storage and don't benefit from horizontal scaling

The Hidden Costs Nobody Talks About

Every abstraction has overhead. Docker's costs aren't just computational (though that extra layer does impact performance). The real costs are cognitive and operational.

Debugging becomes harder. Your application is now wrapped in multiple layers. Network issues become container networking issues. File system problems become volume mounting problems. Memory leaks become container memory limit problems.

Local development gets complex. Simple port conflicts become Docker port mapping configuration. Environment variables become docker-compose.yml files. Quick code changes become image rebuilds.

Security surface area expands. Now you're responsible for base image vulnerabilities, container runtime security, and registry access controls on top of your application security.

I've seen teams spend more time managing their Docker setup than building features.

What Good Docker Usage Looks Like

The teams that use Docker well share common patterns:

They understand the alternatives. Before containerizing, they can articulate why traditional deployment won't work. They've tried systemd services, configuration management, or platform-specific deployment tools.

They optimize for their actual problems. If they need environment consistency, they focus on that. If they need scaling, they design for horizontal scaling from day one.

They keep it simple. Multi-stage builds are common. Alpine base images unless they need specific libraries. Minimal layers. No installing debugging tools in production images.

They automate ruthlessly. If you're manually running docker commands in production, you're doing it wrong. Everything goes through CI/CD pipelines with proper testing at each stage.

The Path Forward

Here's how to escape the Docker cargo cult:

Start with the problem, not the solution. Before adding Docker to any project, write down the specific problem you're solving. "Everyone uses Docker" isn't a problem statement.

Learn the fundamentals. Understand what containers actually are. Learn about namespaces, cgroups, and union filesystems. Spend time with docker inspect and docker exec to see what's really happening.

Practice alternatives. Try deploying the same application multiple ways. Use systemd services, configuration management tools, or platform-specific deployment. Compare the complexity and maintenance overhead.

Measure everything. Track build times, deployment times, resource usage, and debugging time. Make decisions based on data, not assumptions.

Docker isn't going anywhere. But neither is the need for developers who understand when and why to use it. The industry needs fewer Docker users and more Docker understanders.

Stop copying configuration from Stack Overflow and start understanding what those configurations actually do. Your future self (and your production environment) will thank you.

The next time someone asks why you're using Docker, you should have a better answer than "that's how everyone does it."

Top comments (0)