لابات Docker عملية

لابات Docker هنا بتخليك تشتغل على Docker فعلًا مش تتفرج عليه. كل لاب بيفتح لك ماكينة Linux حقيقية فيها Docker شغال ومعاها مهمة محددة: تبني image، تصلّح Dockerfile بايظ، ترجّع service وقعت، أو تأمّن container قبل ما يطلع production.

هتتدرب على إيه في لابات Docker؟

  • Containers و Images
  • Dockerfile و Multi-stage builds
  • Networks و Volumes
  • Docker Compose
  • Health checks و Resource limits
  • Registries و Digests
  • Troubleshooting و Incidents
  • Security و Hardening
  • Backup و Restore
  • Multi-platform images
  • Release pipeline
  1. 01
    Containers and Images

    Run and inspect your first containers, then build a small image and publish its port.

    مبتدئ · 20 دقيقة

  2. 02
    Identify the Container from Host Evidence

    Monitoring gives you one host PID and nothing else. Work back to the container it belongs to without restarting it.

    متوسط · 25 دقيقة

  3. 03
    Lifecycle and Troubleshooting

    Two containers are down for two different reasons. Diagnose both from evidence, repair them, and drive a container through every state it has.

    متوسط · 30 دقيقة

  4. 04
    Containerize the Status API

    Take a real Node service from source code to a running, published container — writing the Dockerfile yourself.

    مبتدئ · 35 دقيقة

  5. 05
    Repair a Fragile Dockerfile

    A Dockerfile that builds cleanly and is wrong five ways. Find them from the built image, not from reading, and fix them without changing what the app does.

    متوسط · 35 دقيقة

  6. 06
    Build Context and Multi-Stage Images

    A working image that ships a build cache, a git directory and a developer's .env. Cut the context, split the build, and prove the runtime carries only what runs.

    متوسط · 40 دقيقة

  7. 07
    Build Images for Two Architectures

    Half your team is on arm64 laptops and the servers are amd64. Publish one image reference that serves both, find out where the emulation actually lives, then stop needing it.

    متوسط · 45 دقيقة

  8. 08
    Practical Exam A — Build a Production Image

    A repository with no container tooling and a list of production requirements. Produce a release-quality image and defend your choices. Requirements only — no procedure.

    متقدم · 1.3 ساعة

  9. 09
    Backup, Destroy, Restore

    Take a backup of a live PostgreSQL container, delete the container and its volume for real, and bring the data back — verified against a checksum you recorded first.

    متوسط · 40 دقيقة

  10. 10
    Fix a Volume Permission Failure

    A database hardened to run non-root will not start against its mounted directory. Find the ownership mismatch and repair it without handing root back or making the data world-writable.

    متوسط · 30 دقيقة

  11. 11
    Networks and Volumes

    Connect containers by name on a private bridge network, and prove data survives container replacement with a named volume.

    متوسط · 25 دقيقة

  12. 12
    Three-Zone Network Segmentation

    Split an application across edge, app and data networks so a compromised gateway has no route to the database — then test the paths that are supposed to fail.

    متوسط · 35 دقيقة

  13. 13
    Restore a Failed Service Path

    Three faults on one request path — a name that will not resolve, a process on the wrong address, and a port mapping to nowhere. Repair all three without flattening the network.

    متوسط · 40 دقيقة

  14. 14
    Compose the Service Stack

    Define the Status API plus PostgreSQL as one Compose stack: private network, named volume, environment config, and health-aware startup.

    متوسط · ساعة

  15. 15
    Overrides, Profiles, and Safe Configuration

    One stack, two environments, optional extras that cost nothing when unused — and a database password that stops living in the file.

    متوسط · 40 دقيقة

  16. 16
    Scale the API Behind the Gateway

    Three replicas behind Nginx. One problem announces itself with an error; the other is silent and is the one that matters.

    متوسط · 40 دقيقة

  17. 17
    Practical Exam B — Restore a Broken Stack

    You inherit a deployment that does not work. Several things in the Compose file are wrong, some loudly and some silently. Existing data must survive the repair.

    متقدم · 1.5 ساعة

  18. 18
    Prove Graceful Shutdown

    Every deploy drops requests because SIGTERM never reaches the application. Find it in the exit code, fix PID 1, and prove the stop is clean.

    متوسط · 35 دقيقة

  19. 19
    Health and Resource Limits

    Give a service a real healthcheck, enforce CPU and memory limits, and run it without root.

    متقدم · 25 دقيقة

  20. 20
    Respond to a Container Incident

    Slow, restarting, and a disk filling up. Work out which of the three is the cause, restore service, and keep the evidence.

    متقدم · 40 دقيقة

  21. 21
    Harden the Runtime

    A service running as root with every default capability and a writable filesystem. Apply the four controls and keep it serving.

    متقدم · 35 دقيقة

  22. 22
    Scan, Inventory, and Prove an Image

    A credential reached a published image. Find it with a scanner, ship a clean rebuild that never contained it, and leave behind an SBOM and a provenance record that name the exact digest.

    متقدم · ساعة

  23. 23
    The Secret in the Layer

    A credential was copied into an image and deleted in the next instruction. Find it in the layer that still has it, rebuild without it, and harden what runs.

    متقدم · 40 دقيقة

  24. 24
    Publish a Release by Digest

    Push one build under several tags to a private registry, prove they all name the same bytes, then delete every local copy and pull it back by digest.

    متوسط · 45 دقيقة

  25. 25
    Build the Release Pipeline

    Wire build, test, scan and publish into one script that fails fast, refuses to ship a broken revision, and tags every release immutably.

    متقدم · 1.3 ساعة

  26. 26
    Promote and Roll Back by Digest

    Promote a tested release without rebuilding, deploy one that passes its health check and answers wrongly, and get back in two minutes.

    متقدم · 40 دقيقة

  27. 27
    Practical Exam C — The Release Lifecycle

    Source to a hardened, scanned, signed, published release — then deploy it, find it faulty, and recover by rolling back to a digest you can prove was verified.

    متقدم · ساعتين

  28. 28
    Rescue and Harden Production

    A production-like stack is down. Diagnose it, restore service, then harden the image and runtime and prove it survives a database restart.

    متقدم · 1.5 ساعة

شوف الكورس كامل

ليه تتعلم Docker عملي؟

  • Docker مش نظرية؛ الفرق بين اللي فاهمه واللي شغال بيه بيبان أول ما container يقع.
  • اللابات بتمشي معاك من أول container لحد pipeline كامل بيطلع release بالـ digest.
  • في لابات مخصصة للأعطال: Dockerfile هش، volume من غير صلاحيات، service path واقع. دي اللي بتقابلها في الشغل.

أسئلة شائعة

محتاج أعرف Linux قبل لابات Docker؟

أساسيات الـ terminal كفاية: تتنقل بين المجلدات وتشغّل أوامر. لو حاسس إنك محتاج تقوّي الأساس، ابدأ بلابات Linux وارجع.

اللابات بتغطي Docker Compose؟

أيوه. في لابات لبناء stack كامل بـ Compose، ولـ overrides و profiles، ولعمل scale لـ API ورا gateway.

في امتحانات عملية؟

أيوه، تلات امتحانات عملية في آخر الكورس: تبني production image، ترجّع stack بايظ، وتعمل دورة release كاملة.