nitrosites.
Docker containers, explained
The big idea

A Docker container is a sealed box for an app.

How we package and protect your site on our infrastructure.

A website is never just code…
your app PHP 8.2 nginx conf libraries env vars cron jobs
…it depends on all of this being installed just right on the server.
A container packs it all into one sealed unit
PHP nginx libs · env · cron client-site:v12
The recipe for the box is called an image.

Code + runtime + config, sealed together. Any server running Docker can run the box — exactly the same way, every time.

Three ways to run an app on a server

Same hardware, three levels of packaging.

hardware one shared OS + PHP + libs site A site B

Classic hosting

Everything shares one environment. Upgrading PHP for one site risks breaking the others.

hardware hypervisor + host OS guest OS · GBs site A guest OS · GBs site B

Virtual machines

Strong isolation — but each VM hauls a full OS. Gigabytes each, minutes to boot.

hardware Docker + shared OS site B site A site C

Containers

Each site sealed in its own box, sharing one OS kernel. Megabytes, not gigabytes — starts in seconds.

No more “works on my machine”

The image is the single source of truth. Every machine runs the identical box.

v12
image registry
v12
dev laptop
v12
web server
v12
another server

Same PHP, same libraries, same config — bit for bit. If it runs on the laptop, it runs in production. Environment-drift debugging mostly disappears.

Portability: servers become interchangeable

The box carries everything it needs — so moving a site is moving a box, not rebuilding a server.

web server A web server B client-a client-c client-b client-b

On the new box: docker compose pull && docker compose up -d — live in minutes.

No reinstalling PHP, no recreating vhosts, no chasing extensions. Point DNS, done. Works in reverse too: shift a heavy site to a quieter server whenever it makes sense.

Security: a breach stays in its box

The classic hosting incident: one site's outdated plugin gets exploited. What happens next depends on the packaging.

Shared environment
one PHP pool · one filesystem site A site B · old plugin site C breach spreads to every site
Containers
site A site B · old plugin sealed inside site C neighbours never notice

The container has no view of the rest of the server — no other sites' files, no other databases, no host packages. Cleanup is contained too: destroy the box, redeploy a clean image, restore uploads. Minutes, not a weekend of forensics.

One busy site can’t sink the server

Every container gets a CPU and memory budget. Watch what happens when site C gets hammered.

site A
30%
site B
25%
site C
20%
A normal day. Everyone within budget.
site A
4%
site B
3%
site C
93%
Without limits: site C gets a traffic spike (or an infinite loop) and starves everyone — every site, and the server itself, slows to a crawl.
site A
30%
site B
25%
site C
⚑ cap
40%
With limits (--cpus 1 --memory 1g): site C maxes out its own budget and slows down alone. A and B never notice.

Crash? Back in seconds.

A container is disposable — the image is what matters. Losing the box costs seconds, not an afternoon.

client-site:v12 · up 14 days crashed · exit code 137 client-site:v12 · up 3 seconds

restart: always — Docker relaunches a crashed box automatically, identical to the last one.

Bad deploy? Roll back by running the previous image tag (v11). Data lives in mounted volumes outside the box, so it survives every restart and redeploy.

Which hosting approach fits which site?

Three common ways to host a website — each earns its place.

Control panels

CyberPanel & cPanel

  • Fastest path to a standard site: WordPress, SSL, email, DNS in a few clicks
  • One familiar UI for day-to-day hosting chores
  • Great fit for many small sites on one shared stack (LiteSpeed / Apache)
Trade-off — for both: sites share the environment (softer isolation), one stack version for everyone, and moving a site means rebuilding it elsewhere. Plus cPanel licensing costs per account.
Static edge hosting

CDN / flat files

  • No backend at all — the site ships as flat files served from data centres worldwide (Cloudflare-style)
  • Effectively instant loads and near-unlimited scale
  • Nothing to hack or patch server-side: no PHP, no database
Trade-off: only fits sites with no server-side backend — logins, carts and dynamic content need another home (or edge functions).
Containers

Docker

  • Hard isolation per site — breaches and crashes stay in the box
  • Portable: move sites between servers in minutes
  • Reproducible custom stacks, resource caps, instant rollback
Trade-off: no all-in-one hosting UI — deploys are config files and CLI (which is also why they're so repeatable).

Rule of thumb: static edge hosting when a site is pure front-end; a panel when speed-to-launch on a standard stack wins; Docker when a site needs isolation, portability, a custom stack — or simply deserves its own sealed box.

The five things to remember

  1. A container is a sealed box — app + runtime + config, built from an image.
  2. Same box everywhere — laptop, web server, any server. No environment drift.
  3. Portable — moving a site is pulling an image, not rebuilding a server.
  4. Isolated — a hacked or crashing site can't touch its neighbours.
  5. Disposable — crash, redeploy, or roll back in seconds; data lives in volumes.
When containers are the right choice
  • A site needs its own PHP/Node version or a custom stack
  • A site warrants hard isolation from its neighbours
  • The site may need to move or scale across servers
  • Uptime matters enough to want auto-restart and instant rollback

Simpler sites stay happy on a control panel — and pure front-end sites fly on static edge hosting.