Cloud Native Meetup · Jatiya Kabi Kazi Nazrul Islam University

DOCKER
101

Ship your machine, not your excuses.
The death of “but it works on my machine.” 🐳

Md. Amdadul Bari Imad DevOps Engineer · Kubestronaut
amdadulbari.com · @amdadulbari
whoami
Md. Amdadul Bari Imad

Hi, I'm Amdadul Bari 👋

DevOps & Platform Engineer. My actual job: make sure code that works on one machine works on ten thousand.

I build platforms that let teams ship with confidence — because “great infrastructure should be invisible.”

Kubestronaut 🚀 12 cloud-native certifications

…and it all started with an app that only ran on my laptop — just like yours. 😄

Credentials · all verifiable on Credly

I collect these like cargo. 📦

Kubestronautall 5 K8s exams · 2025
CKSK8s Security · 2025
CKAK8s Administrator · 2024
CKADK8s App Developer · 2024
KCSACloud Native Security · 2024
KCNACloud Native Assoc. · 2024
KCAKyverno · 2025
CGOAGitOps · 2025
PCAPrometheus · 2025
CBABackstage · 2025
AWS SAASolutions Architect · 2021
LFC102Inclusive OSS · 2025

Every one of these started exactly where you are tonight. The path is real — and reachable. 🧗

Today's voyage 🗺️

Where this ship is sailing ⛴️

⚓ cast offship it 🚩
01The Problemwhy “works on my machine” ruins lives
02Meet Dockercontainers, in plain human words
03Hands Onbuild, run, ship — real commands
04Your Movestart this week + level up

This is interactive — shout answers, laugh at the memes, ask anything. By the end, you'll containerize your own project.

The most expensive sentence in software

“It works on my machine.” 🤷

It has killed demos, delayed launches, and started 30 years of war between developers and ops. Everyone has said it. Today, we kill it. 💀

Exhibit A · the 2 a.m. group project

Same code. Four disasters. 🎬

😎
You✔ runs perfectly
😰
Rakib✗ npm error ×214
😭
Fatima✗ “python not found”
💀
Lab PC · demo day✗ blue screen

4 laptops · 4 operating systems · 3 versions of Python · 1 deadline in 6 hours. Not a bug — a horror movie.

Diagnosis · your laptop is haunted 👻

Your code isn't alone.
It has ghosts.

Your app secretly leans on a hundred invisible things that just happen to live on your laptop. Clean machine → ghosts gone → app dies.

  • 🐍Python 2.7 AND 3.9 AND 3.11 — nobody knows which one runs
  • 📦node_modules heavier than a small galaxy
  • 🕯️A library you installed at 3 a.m. in 2022 — everything depends on it
  • 🌫️Your PATH: a mystery not even you understand
  • 🗂️final_project_v2_real_FINAL.zip
Root cause · the iceberg 🧊

You ship the tip. The rest sinks you. 🧊

YOUR CODE ✔ the 10% you wrote OS & kernel runtime + version system libraries environment variables secrets & config the exact ports the invisible 90% 👇

Everything below came “for free” on your laptop. The fix isn't “be careful” — ship the whole iceberg. 🚢

A tiny bit of history · 2013

Devs threw code over the wall 🧱

Developers

“It works! Ship it!” throws code over the wall

The Wall

Nobody could reproduce anyone's setup. Endless blame.

Operations

“…it doesn't run here.” 3 a.m. pages. Sadness.

In 2013 a little whale showed up and knocked the wall down.

The plot twist

You: “It only works on my machine.”
Docker: “Cool. We'll ship your machine.” 🚢

Seal the code + its entire haunted environment into one box — and run that exact box anywhere on Earth.

❌ works ONLY on my machine
Meet the whale 🐳

So… what is Docker?

Docker is a tool that packs your app into a container — a sealed box that runs identically everywhere: your laptop, your friend's, a server, the cloud.

born 2013 mascot: Moby Dock 🐳 free to start
Definition · the box 📦

A container = a tiffin box for code.

Mom packs the food, the exact spices, the right rice — and seals it. Open it in the hostel, in class, on the bus: same taste, every time.

  • 🍱Seals your code + libraries + settings in one box
  • 🌍Open it anywhere — identical every time
  • Boots in seconds, lighter than you'd guess
MY-APP : 1.0
SEALED · PORTABLE
+ python 3.12 · + all libraries
+ every setting it needs
Old way vs new way

Why not just use a whole computer? 🖥️

🏢

Virtual Machine

Renting a whole apartment — kitchen, bathroom, the works — for one houseplant.

🐘 Gigabytes · boots in minutes
VS
🪴

Container

Just the shelf. Borrows the building's plumbing (your OS).

🐇 Megabytes · boots in a second

Your laptop runs 50 containers for breakfast — but 2 VMs and it starts sweating. 🥵

The secret · shared kitchen

Why is a container so tiny & fast?

VM = full house

Carries its own entire operating system. That's the gigabytes.

Container = hostel room

Shares the building's kitchen & plumbing (the host OS kernel).

So it packs only…

…what's unique to your app. Starts instantly, weighs almost nothing.

Shared plumbing = cheaper, lighter, faster. That's the whole trick. 🔧

The 3 words you MUST remember

Image → Container → Registry

ImageThe recipeA frozen blueprint. Build once.
ContainerThe cooked dishA live box, started from the recipe.
RegistryThe restaurantDocker Hub — the world's recipe shelf.

One recipe → cook endless identical dishes → share it with the planet. 🌐

Under the lid · image layers 🥪

An image is a stacked sandwich

Built bottom-up in layers. The magic: layers are cached and shared.

  • 🍞Change only your code? Docker reuses every layer below
  • So the 2nd build takes seconds, not minutes
  • 💾Ten apps on the same base? They share that layer on disk
YOUR CODE ← changes often
dependencies
python runtime
base OS ← rarely changes
The recipe · Dockerfile

6 lines. The whole recipe. 👩‍🍳

A Dockerfile is a to-do list for Docker, read top to bottom. That's it.

  • FROM“Start from a mini Python computer”
  • RUN“Install my libraries”
  • COPY“Bring my code in”
  • CMD“Now run it 🙏”
Dockerfile
FROM python:3.12-slim   # a mini computer
WORKDIR /app           # go to my folder
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .               # bring my code
CMD ["python", "app.py"]  # please work 🙏
Command 1 of 2 · bake it 🍰

docker build — freeze the recipe

~ my-project
docker build -t myapp .
   -t myapp  → name it "myapp"
   .         → recipe is in THIS folder
✔ Step 1/6 : FROM python:3.12-slim
✔ Successfully built & tagged myapp:latest 🍰

One command turned your messy project into a portable, frozen image.

Command 2 of 2 · run it ▶️

docker run — bring it to life

any-machine ~
docker run myapp
✔ Running on http://localhost:8000
✔ …exactly the same on EVERY machine 🌍

Your laptop · Rakib's · the cursed lab PC · a server in Singapore — identical. “Works on my machine” is now physically impossible.

Opening the door · ports 🚪

“I ran it… why is my browser empty?

A container is a sealed room — by default, no doors. The -p flag installs one.

  • 🚪-p 8000:8000 = connect your laptop's port → the container's port
  • 🌐Now localhost:8000 actually opens your app
  • 🧠Forgot -p? App runs fine — you just can't reach it
~ open the door
docker run -p 8000:8000 myapp
            └──┬──┘
      your laptop : container
✔ open http://localhost:8000 🎉
Your control panel · daily drivers 🎛️

Four commands you'll use forever

docker psWhat's running?

Lists your live containers right now.

docker logsWhat's it saying?

Read output & crash reasons. You'll live here.

docker exec -itWalk inside

Open a shell inside the running box.

docker stopShut it down

Politely stop the container.

90% of debugging is just reading the logs. Befriend docker logs early. 🤝

Don't lose your data · volumes 💾

Containers are disposable. Your data isn't.

Delete a container and everything inside vanishes — on purpose. So where does your database live?

  • 🧹Container = a whiteboard — wiped when you leave
  • 📓Volume = your notebook — a folder that survives, plugged in from outside
  • 📌Rule of thumb: code in the image, data in a volume
~ keep the data
docker run -v mydata:/var/lib/db \
  postgres
# -v mydata → a notebook that
#   OUTLIVES the container 📓
✔ delete container → data is safe
Share it · Docker Hub 🏪

Like GitHub — but for whole apps.

Docker Hub is the world's shelf of ready-made containers. push yours up, pull anyone's down.

  • ⬆️docker push — upload your image for anyone to run
  • ⬇️docker pull postgres — a full database, zero install
  • 🎁Your friend runs your app with one pull. No setup. Ever.
~ ship to the world
docker push amdadul/myapp
✔ pushed to Docker Hub 🌍
# now, anyone, anywhere:
docker run amdadul/myapp
✔ it just… works.
When your app has friends

Real apps travel in a squad. 👥

docker compose = one file for the whole gang (app + database + cache), one command to launch them all, already wired together.

🧑‍💻 your app 🗄️ postgres ⚡ redis

Teammate clones → runs one command → gets your exact setup, database and all. The dream. 😌

docker-compose.yml
services:
  app:
    build: .
    ports: ["8000:8000"]
  db:
    image: postgres:16
docker compose up  # launches EVERYTHING 🚀
Rookie traps · we've all been here 😅

Mistakes you'll make (then never again)

OOPS 012GB image

You COPY'd node_modules, .git & cat photos. Add a .dockerignore.

OOPS 02Forgot -p

App runs, browser empty, you panic. Open the door.

OOPS 03Lost the data

Deleted the container, forgot the volume. RIP database.

OOPS 04Trusted :latest

“latest” silently changed. Pin real versions: :3.12.

Every single one of us shipped a 2GB image once. It's a rite of passage. 🎓

Where this leads · ☸ cloud native

The container is a doorway. 🚪

Once your app is a container, the whole cloud-native world opens up — and it all sits on top of what you just learned.

Kubernetes

Runs thousands of containers & auto-heals crashes at 3am.

CI/CD

Robots build & ship your container on every git push.

The Cloud

Run your container at planet scale — AWS, GCP, Azure.

You didn't learn a tool today. You learned the foundation of the whole industry.

Why YOU should care — today

This is your unfair advantage. 🎯

Recruiters notice

“Docker” on a CV = instant green flag for internships.

Demos never die

Your project runs on the professor's PC. Every time.

The doorway

K8s, CI/CD, cloud jobs — all built on containers.

Fast to learn

The basics? Honestly, one focused weekend.

Docker is the #1 skill in DevOps internship posts. You're one weekend from your CV. 🚀

Your move · start this week 🗓️

4 tiny steps. Do them this week.

STEP 01Install

Docker Desktop. 10 min, one download.

STEP 02Containerize

Add a Dockerfile to a project you already have.

STEP 03Run it

build + run. Feel the “aha.”

STEP 04Share it

Push to Docker Hub. Send a friend one command.

free · no install: labs.play-with-docker.com docs.docker.com/get-started DM me if you're stuck — really
📸 Snap this · your cheat sheet

The entire talk, on one card

docker-cheatsheet.txt
docker build -t myapp .        # bake the image 🍰
docker run -p 8000:8000 myapp  # run + open the door 🚪
docker ps                      # what's running? 👀
docker logs <id>               # why did it break? 📜
docker push amdadul/myapp       # share with the world 🌍
docker compose up               # launch the whole squad 🚀

Six commands. That's genuinely enough to be dangerous. 😎

The whole journey · in one breath

If you forget everything else…

The pain

“Works on my machine” — your app dragged invisible ghosts.

The fix

A container seals code + environment into one portable box.

The payoff

Build → run → share → and the whole cloud opens up.

Don't ship your code and pray. Ship the whole box. 🐳

Docked safely 🐳

From “works on my machine”
to “works on every machine.”

✅ works on EVERY machine

Thank you, Jatiya Kabi Kazi Nazrul Islam University! 🙌
Now go ship something. Questions? Let's talk — and DM me anytime.

amdadulbari.com · GitHub / LinkedIn @amdadulbari · me@amdadulbari.com
Open floor

Q & A

Ask me anything — Docker, DevOps, Kubernetes, certs, careers, or how I ruined a production server once. 😅

amdadulbari.com GitHub @amdadulbari LinkedIn @amdadulbari me@amdadulbari.com
DOCKER 101 · ship your machine 🐳
← → navigate · S notes · F fullscreen 01 / 31
Speaker notes
/ Space next
previous
S speaker notes + timing
F fullscreen
? toggle this