Milind Daraniya

Docker Is No Longer Just a DevOps Tool: Why Developers Should Learn It

Published August 21st, 2026 19 min read

A few years ago, when someone said Docker, I mostly connected it with DevOps, deployment and production infrastructure.

Today, I look at it differently.

For me, Docker has become a developer tool first and a DevOps tool second.

Especially when working on Laravel, PHP, MySQL, Redis, React and multiple services together, Docker can solve a lot of problems that developers normally waste time on.

And this is not just my feeling.

In Stack Overflow's 2025 Developer Survey, Docker saw a 17 percentage point increase in usage, the largest single-year jump among the cloud development and infrastructure technologies included in the survey. Stack Overflow also described Docker as moving from a popular tool toward something close to universal in development.

That makes me think about something important:

Docker is becoming part of normal software development, not something only DevOps engineers need to know.

The "works on my machine" problem

Every developer has seen this.

Developer A:

"It works on my machine."

Developer B:

"It doesn't work on mine."

Then the debugging starts.

Maybe the PHP version is different.

Maybe MySQL is a different version.

Maybe Redis is missing.

Maybe Node.js is different.

Maybe one developer has an extension installed that another developer doesn't have.

Maybe the operating system is different.

Maybe a configuration file is different.

Sometimes we spend more time fixing the environment than writing the actual feature.

This is one of the biggest reasons I like Docker.

Instead of saying:

"Please install PHP 8.3, MySQL 8, Redis, Node.js and these extensions."

we can describe the environment as code.

That is a big improvement.

Docker gives us a predictable environment

Imagine a Laravel project that requires:

PHP 8.3
MySQL 8
Redis
Node.js
Nginx

Without containers, every developer has to configure these separately.

With Docker, we can define the environment once.

Something like:

Laravel Application
        |
   Docker Compose
        |
  -------------------
  |        |        |
 PHP     MySQL     Redis
  |
 Node / Vite

Now a new developer can clone the project and start the environment instead of spending hours installing dependencies manually.

This is not only convenience.

It makes the development process more consistent.

Docker is especially useful for Laravel developers

Laravel applications often need more than PHP.

A typical application may have:

Laravel
PHP-FPM
Nginx
MySQL
Redis
Queue Worker
Scheduler
Node.js
Vite
Mail Service

On a small project, installing all of this directly on the developer machine can become messy.

On a large SaaS application, it becomes even more complicated.

Docker gives us a way to keep these services separated.

For example:

app
queue
scheduler
nginx
mysql
redis

Each service has a clear purpose.

It also helps when versions change

This is a problem I have personally seen many times.

A project works perfectly on:

PHP 8.3

Then another project requires:

PHP 8.4

And suddenly the local environment becomes a mess.

Maybe one project needs Node 20.

Another needs Node 22.

One project needs MySQL 8.

Another project uses PostgreSQL.

One needs Redis.

Another does not.

Without isolation, the developer machine slowly becomes a collection of special cases.

Docker solves much of this problem.

Project A can have:

PHP 8.3

Project B can have:

PHP 8.4

without forcing the whole laptop to switch versions.

That is extremely useful.

Docker Compose is where things become practical

I don't think developers need to start by becoming Docker experts.

For application development, Docker Compose is often enough to understand the basic architecture.

For example:

services:
  app:
    build: .
    depends_on:
      - mysql
      - redis

  mysql:
    image: mysql:8

  redis:
    image: redis:alpine

Now the project has a defined environment.

The important part is not memorizing YAML.

The important part is understanding:

What service do I need, and why?

Containers are not virtual machines

This is something many developers misunderstand.

A container is not simply another virtual machine.

Containers share the host kernel and isolate application processes and dependencies.

That makes them much lighter than running a complete virtual machine for every application environment.

For developers, this means we can run multiple isolated services without creating a complete operating system for each one.

This is one reason containers became so useful for modern development.

But Docker does not magically make an application better

This is also important.

I don't think every project needs Docker.

If I have:

Simple PHP website

with:

PHP + MySQL

and one developer maintains it, Docker may not provide a huge benefit.

Adding Docker just because it is popular can create unnecessary complexity.

Technology should solve a problem.

Not create another problem.

Docker becomes much more valuable as the project grows

Suppose we start with:

Laravel
MySQL

Then the application grows.

Now we add:

Redis
Queue workers
Scheduler
Mail service
Search
Object storage
React frontend
WebSocket server

Suddenly our local environment is no longer simple.

Docker becomes much more attractive.

This is especially true for SaaS products.

Local development and production become closer

One of the biggest advantages I see is reducing the gap between development and deployment.

Without containers:

Developer machine
      ↓
Some server
      ↓
Different configuration

With containers:

Application definition
      ↓
Build
      ↓
Container image
      ↓
Environment

We can make the development and deployment process more predictable.

It doesn't make environments identical automatically, but it gives us a much better foundation.

Docker also improves onboarding

Imagine a new developer joins a project.

Without Docker, the onboarding document may say:

Install PHP.

Install Composer.

Install MySQL.

Install Redis.

Install Node.js.

Install npm.

Configure environment variables.

Create database.

Configure Redis.

Fix PHP extensions.

Fix version mismatch.

Then:

"Now run the project."

This can take hours.

With a well-designed Docker setup, the process can be much simpler.

Clone.

Configure .env.

Start containers.

Install dependencies.

Run migrations.

Start development.

That is a very different developer experience.

But don't hide everything behind Docker

There is another mistake I see.

Some developers learn:

docker compose up

and stop there.

That is not enough.

When something breaks, they don't know what is happening.

For example:

Why is the Laravel container stopping?

Why can't PHP connect to MySQL?

Why can't Redis connect?

Why is port 3306 already used?

Why is the volume huge?

Why is the container consuming memory?

Why is the queue worker not processing jobs?

We still need to understand the fundamentals.

Docker should make us better developers.

It should not become another black box.

Learn the basic commands

For normal development, I think these are enough to start:

docker ps

See running containers.

docker ps -a

See all containers.

docker logs <container>

Check logs.

docker exec -it <container> sh

Enter a running container.

docker compose up -d

Start the environment.

docker compose down

Stop the environment.

docker compose build

Rebuild images.

You don't need to memorize hundreds of Docker commands to become productive.

Understand the basic workflow first.

Images and containers are different

This distinction is important.

An image is the package or blueprint.

A container is a running instance of that image.

For example:

PHP Image
   ↓
PHP Container

We can create many containers from the same image.

This becomes useful when scaling workers or services.

For example:

Queue Worker 1
Queue Worker 2
Queue Worker 3

All can run from the same application image.

Docker becomes very useful for queues

Laravel queues are one example where containerization makes a lot of sense.

Instead of running:

php artisan queue:work

manually on a developer laptop, we can create a worker service.

For example:

app
queue
scheduler

The queue container can continuously process jobs.

If the application grows, the worker architecture can be scaled independently.

This is very useful for applications where background jobs handle:

  • Emails
  • Reports
  • Imports
  • Exports
  • Notifications
  • Data synchronization
  • Third-party APIs

Redis and Docker are a natural combination

Laravel applications often use Redis for:

  • Cache
  • Queues
  • Sessions
  • Rate limiting
  • Locks

Docker makes it very easy to run a Redis container locally.

Instead of installing Redis directly on the developer machine, we can keep it as part of the project environment.

That means the application documentation can describe the complete stack.

Docker can also help testing

This is an area I think deserves more attention.

Suppose automated tests need MySQL and Redis.

The test environment can create those dependencies in containers.

That means tests don't necessarily depend on whatever happens to be installed on the CI server.

This helps make CI environments more predictable.

A pipeline can become something like:

Git Push
   ↓
Build
   ↓
Start Containers
   ↓
Install Dependencies
   ↓
Run Tests
   ↓
Build Image
   ↓
Deploy

That is much easier to reason about than a server where every dependency is manually installed.

Don't put secrets inside images

Docker can make deployment easier, but it also introduces things we need to understand.

One rule I strongly follow is:

Do not bake secrets into Docker images.

Don't put:

APP_KEY
DB_PASSWORD
AWS_SECRET
API_KEY

inside a Dockerfile.

An image can be shared, stored, cached and inspected.

Secrets should be injected through the runtime environment or a proper secret-management system.

This becomes increasingly important when containers move into CI/CD and production.

Persistent data needs special attention

Containers are often treated as disposable.

That is good for application containers.

But databases are different.

If I remove my MySQL container, I don't want my production database to disappear with it.

That's why volumes and external persistent storage matter.

The application container can be disposable.

The database data should not be.

This distinction is critical when moving from local development to production.

Don't create one giant container

I prefer containers with a clear responsibility.

Instead of:

One giant container
    PHP
    MySQL
    Redis
    Nginx
    Node

I prefer separating services where there is a good reason.

For example:

app
nginx
mysql
redis
queue

This makes the architecture easier to understand and easier to scale.

Again, this doesn't mean every tiny application needs ten containers.

Use the architecture that matches the project.

Docker is also changing the way teams think about deployment

Earlier, deployment was often:

"Install the software on the server."

Now the thinking is increasingly:

"Build the application into an image and run that image."

This creates a cleaner separation between:

Build

and:

Run

That is a very useful concept.

The same image can move through:

Development
→ Testing
→ Staging
→ Production

with environment-specific configuration.

Why I think every Laravel developer should learn Docker

I am not saying every Laravel developer needs to become a Kubernetes engineer.

That is a completely different level.

But I think understanding:

  • Images
  • Containers
  • Volumes
  • Networks
  • Dockerfiles
  • Compose
  • Environment variables
  • Container logs
  • Resource limits

is becoming increasingly valuable.

The broader developer ecosystem is already moving in this direction, and Docker's growth in the 2025 Stack Overflow survey is a strong indication that container knowledge is becoming normal development knowledge rather than a niche DevOps skill.

My biggest lesson from Docker

The best thing about Docker is not:

"Now I can run containers."

The best thing is:

I can describe my application's environment.

Instead of depending on:

"Milind's laptop has the correct setup."

we can move toward:

"The project defines the setup."

That is a much better engineering mindset.

My final view

I don't think Docker is just a deployment technology anymore.

It has become part of the development workflow.

For Laravel developers, especially those working on APIs, SaaS products, queues, Redis, React frontends and multiple environments, Docker can remove a lot of unnecessary environment-related problems.

But I also don't believe in using Docker blindly.

Start when it solves a real problem.

Understand what the containers are doing.

Keep services reasonably separated.

Protect your secrets.

Use persistent storage correctly.

Learn the basics instead of memorizing commands.

And most importantly, don't let Docker become another black box.

Because the real benefit is not running an application inside a container.

The real benefit is making the development environment predictable, repeatable and easier for the whole team to work with.