Learn Docker in Your Terminal with Bite-Sized Exercises
Ever feel like you need to learn Docker, but the idea of setting up a bunch of containers just to practice feels like overkill? Or maybe you’ve read the docs but want to get your hands dirty in a guided, no-fuss way? There’s a tool that tackles this exact problem, and it lives right in your terminal.
Enter Dockerlings. It’s a clever, interactive tutorial that teaches you Docker concepts through a series of small, manageable exercises you run locally. Think of it like a coding kata, but for container commands.
What It Does
Dockerlings is an interactive CLI tutorial built in Rust, inspired by projects like Rustlings. It presents you with a series of exercises—each contained in its own directory—that focus on a specific Docker command or concept. You read the instructions in a README, edit the necessary files (like a Dockerfile or a compose file), and then run the dockerlings command to verify your solution. It gives you immediate feedback, telling you if you’ve passed or what you need to fix.
Why It’s Cool
The beauty of Dockerlings is in its simplicity and focus. It removes all the fluff and setup. You don’t need to think of a project idea; you just follow the curated path. It starts with the absolute basics (docker run hello-world) and progresses to more involved topics like writing Dockerfiles, managing images, and using Docker Compose.
It’s a sandbox for your terminal. Since it runs and validates everything locally against your own Docker installation, you’re learning with the real tools. The exercises are designed to be "bite-sized," so you can knock out a few in a coffee break, making it perfect for incremental learning. It’s the hands-on, learn-by-doing approach many developers crave.
How to Try It
Getting started is straightforward. You’ll need Rust and Cargo installed, as well as Docker running on your machine.
-
Clone the repository and build the tool:
git clone https://github.com/furkan/dockerlings cd dockerlings cargo install --path . -
Run the
dockerlingscommand to start the tutorial. It will list the exercises and show you which one is next.dockerlings -
Navigate to the suggested exercise directory, read the
README.md, and follow the instructions to complete the task. -
Run
dockerlingsagain in the project root to verify your work. Rinse and repeat.
Final Thoughts
Dockerlings is a genuinely useful tool for developers who are new to Docker or those who want to solidify their fundamentals in a structured way. It’s not a replacement for building real projects, but it’s an excellent primer or practice ground. The next time you have 15 minutes and want to get more comfortable with containers, fire this up instead of scrolling. It’s a productive, low-pressure way to build muscle memory for those Docker commands.
@githubprojects