DEV Community

Mohsen Fallahnejad
Mohsen Fallahnejad

Posted on Edited on Originally published at bitlyst.blog

What is Docker? The 2-minute mental model

Docker lets you package an app with everything it needs (system libs, runtime, config) so it runs the same everywhere.

  • A Docker image is a recipe (read-only).
  • A container is a running instance of that image.
  • You define images with a Dockerfile → build → run.
# Build an image from Dockerfile
docker build -t hello .

# Run it (maps port 3000)
docker run -p 3000:3000 hello
Enter fullscreen mode Exit fullscreen mode

That’s it—portable apps, fewer “it works on my machine” moments.


Originally published on Bitlyst.

Top comments (0)