Menu

What is Docker? The 2-minute mental model
📰

What is Docker? The 2-minute mental model

DEV Community: docker·Mohsen Fallahnejad·7 days ago
#OCNUJl39
#devtodocker#devto#dev#docker#build
Reading 0:00
15s threshold

Mohsen Fallahnejad

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.