Back to Blog

What Is Docker? A Practical Guide for Developers

Kumar Saha
September 30, 2026
7 min read

Docker is a tool that packages an application together with everything it needs to run — code, runtime, system libraries, settings — into a single unit called a container. That container runs the same way on your laptop, a teammate's machine, and a production server, because it's not relying on whatever happens to already be installed there.

The problem Docker solves

Before containers, "it works on my machine" was a real, constant problem. Your app might need Node 18, but the server has Node 16. It might need a specific version of a system library that's missing, or a config file that only exists on your laptop. Every difference between environments was a potential place for something to break.

Docker fixes this by making the environment part of what you ship. Instead of describing instructions for someone else to follow ("install Node 18, then run npm install, then..."), you build an image that already contains all of it — and that exact image is what runs everywhere.

Images vs. containers vs. Dockerfile

These three words get used interchangeably, but they mean different things:

  • Dockerfile — a text file with the instructions to build an image (start from this base, copy these files, run this install command, start with this command).
  • Image — the actual built artifact: a read-only snapshot produced by running the Dockerfile's instructions. You can copy it, push it to a registry, or run it anywhere Docker is installed.
  • Container — a running instance of an image. You can start several containers from the same image, each isolated from the others.

A real Dockerfile, line by line

Here's a minimal one for a small Node.js app:

FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["node", "index.js"]
  • FROM node:22-alpine — start from a base image that already has Node 22 installed
  • WORKDIR /app — every following instruction runs inside this directory
  • COPY package*.json ./ then RUN npm install — install dependencies first, separately from the rest of the code, so Docker can cache this layer and skip reinstalling on every rebuild if only your source changed
  • COPY . . — copy the rest of your app in
  • EXPOSE 3000 — documents which port the app listens on
  • CMD [...] — the command that runs when a container starts from this image

What Docker is not

  • Not a virtual machine. Containers share the host machine's kernel instead of emulating an entire operating system, which is why they start in milliseconds instead of minutes and use a fraction of the resources.
  • Not a hosting platform by itself. Docker builds and runs containers on whatever machine you tell it to — it doesn't give you a public URL, SSL, scaling, or a way to redeploy when you push new code. That's a separate layer on top.

From Dockerfile to a live URL

This is usually where tutorials stop — you understand the concept, you have a working Dockerfile, and then... you're on your own to figure out docker build, docker push to a registry, renting a server, installing Docker on it, and setting up a way to redeploy every time you push new code.

On Abasthan, that whole second half doesn't exist as a separate step. Connect your GitHub repo, and Abasthan builds the image from your Dockerfile (or generates one automatically if you don't have one), pushes it to a private registry, and deploys it — with a live HTTPS URL — on every push. See the full deployment flow for exactly what happens between a git push and a running container.

FAQ

Do I need to write a Dockerfile to deploy on Abasthan?

No. If your repo doesn't have one, Abasthan detects your language (Node, Python, PHP) and generates one for you. If you already have a Dockerfile, it uses yours as-is.

Docker vs. Kubernetes — what's the difference?

Docker builds and runs individual containers. Kubernetes orchestrates many containers across many machines — scheduling, scaling, networking, self-healing. Most small and medium apps never need to touch Kubernetes directly; a platform like Abasthan handles that orchestration layer for you.

Can I use Docker Compose instead?

Docker Compose is built for running several containers together on one machine (an app plus a database, say). Abasthan handles the database side separately — managed Postgres, MongoDB and Redis are one click each, so a single-service Dockerfile is usually all you need.

See your Dockerfile go live

Connect your GitHub repo and Abasthan builds from your Dockerfile automatically — no docker build, no push, no server to manage. First app free.

Deploy Free

KS
Kumar Saha
Abasthan