hello-docker
Hello World with Docker
A pair of minimal C example programs that teach Docker basics, a hello-world container and one that lists a container's own file system.
This repository is a collection of simple example programs designed to teach you the basics of Docker—a tool that packages applications into isolated, portable containers. If you're new to Docker, this repo gives you hands-on starter projects so you can see how it works without jumping into complex real-world applications.
The repo includes two minimal programs. The first is a classic "hello world" example that runs inside a Docker container and prints a greeting. The second shows you what's actually inside a container's file system by listing its contents. Both are intentionally simple, so they focus on the Docker mechanics rather than burying you in application logic. You run each one as a container, which is Docker's way of saying: "Here's an isolated environment with just the code and dependencies it needs."
Docker containers are useful because they let you package up an application once and run it anywhere—on your laptop, a colleague's machine, or a cloud server—without worrying about differences in operating systems or what's already installed. These example programs help you understand that core idea by showing the smallest possible version: minimal programs that Docker can wrap up and execute reliably.
If you're getting started with Docker, this is a good place to experiment. You can build these containers, run them, and see firsthand how Docker isolates an application from the rest of your system. It's less about writing new code and more about learning the Docker workflow: how to set up a container, run it, and see what happens. The examples are written in C, keeping them lean and focused on the Docker concepts rather than language features.
Where it fits
- Learn how to build and run your first Docker container from scratch.
- See what files exist inside an isolated container's file system.
- Practice the Docker workflow of building, running, and inspecting containers.
- Understand container isolation before applying Docker to a real application.