Unlocking Docker: A Personal Journey from Confusion to Confidence


You know how you can follow every step in a tutorial, the app works, but you still don’t really get what’s going on?
That was me with Docker.
I could make things run in containers, but something felt off — I didn’t understand why things were working… or worse, why they sometimes didn’t.
📦 My First Real Experience with Docker
The first time I tried Docker was for a work-related app. To experiment safely, I made a dummy app — I think it was Spring Boot at the time (though honestly, I don’t remember much now — it’s been years!).
Tutorials made it seem simple:
Create a Dockerfile
Add some
RUN
,COPY
, andCMD
linesBuild and run
And yes, it worked.
But when I tried the same approach for a different app… it didn’t.
Same base image. Similar commands. Still, it failed.
That inconsistency frustrated me — and I realized I was just copying stuff without truly knowing what was going on.
🛠️ My (Not-So-Glorious) Debugging Phase
That’s when I took a detour.
Instead of editing Dockerfile over and over and rebuilding blindly, I thought:
“Let me just start a container, go inside it, and try running the steps manually.”
So I did:
Started an
ubuntu
container in interactive modeInstalled dependencies manually
Copied files using
docker cp
Ran my app, debugged, tried things live
And suddenly, I could see what was missing.
Turns out, my host machine had things pre-installed (like Java or other dependencies), but the container didn’t — so the Dockerfile was incomplete.
I didn’t even know about official base images like openjdk
or node
at that time.
I was starting from plain Ubuntu and building everything from scratch. 😅
🤯 The Aha! Moment
Doing everything manually felt slow… but it helped me internalize what a Dockerfile is really doing.
Now, when I wrote:
FROM openjdk:17
COPY . /app
WORKDIR /app
RUN ./gradlew build
CMD ["java", "-jar", "build/libs/app.jar"]
… it wasn’t just syntax. I could mentally walk through what’s happening at each step — because I’d done it myself and know which steps can be optimized more.
That was the turning point for me.
🚀 The Power of Docker (That Took Me Time to Appreciate)
Today, we hear a lot about Docker’s power: how it lets us spin up Postgres, MongoDB, Redis — all in isolated containers — without installing anything directly on our machine.
But honestly?
That magic didn’t feel magical at first. In fact, it was kind of confusing.
What helped me was not just reading Dockerfiles… but living through the steps they represented.
🎯 Final Thoughts
Looking back, I’m glad I took that detour.
It slowed me down at first — but helped me build intuition and confidence that I still carry today.
I didn’t cover all the gritty details here, but if you're curious about the real-world challenges I faced while containerizing actual projects, let me know — happy to write a follow-up.
✍️ Thanks for reading. If you’ve ever felt Docker didn’t “click,” you’re definitely not alone.
Subscribe to my newsletter
Read articles from Dhruv Bhartia directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
