Property of riak33

Part 5

Deploying Your First Apps

Property of riak33

The Problem — Without Docker

Step What You Do The Pain
1 Buy/rent a server Expensive, slow, need credit card
2 Install dependencies Version conflicts, "works on my machine"
3 Copy files via FTP/SCP Manual, error-prone
4 Install & configure web server Complex config files
5 Run app process manually If it crashes, it's gone
6 Repeat for every server Wasted time, inconsistent
Property of riak33

"It works on my machine, but not on the server."

Property of riak33

The Solution — With Docker

Aspect Traditional Docker
Setup time Hours/days Seconds
Dependencies Manual install Bundled in image
Isolation None Complete isolation
Portability Hard Run anywhere
Restart on crash Manual Automatic
Property of riak33

The Analogy

Traditional = Buying land, building a house

Docker = Renting a fully-furnished apartment

Property of riak33

What is Docker?

Property of riak33

How Docker Works

Component What It Does
Docker Client You type commands here
Daemon The engine that runs containers
Image Blueprint (read-only template)
Container Running instance of an image
Registry Library of images (Docker Hub)
Property of riak33

The Flow

You (Client) → Daemon → Container (from Image) ← Registry
Property of riak33

Docker vs Traditional — When to Use What

Use Case Recommendation
Learning basics Run directly on VM
Production app Docker
Multiple apps on one server Docker
Need maximum performance Bare metal
Property of riak33

Key Takeaways

  1. Without Docker = manual, fragile, inconsistent
  2. With Docker = packaged, portable, repeatable
  3. Container = running instance of an image
  4. Image = blueprint
  5. Registry = library of images
Property of riak33

That's a Wrap!