What is container management?

Container management is the ongoing care of containerised applications: getting images built and stored, keeping them updated, limited, observed and secure.

How is management different from orchestration?

Orchestration places and restarts containers across machines; management is the full life around them. Even on a single server with no orchestrator, someone must decide where images come from, how often they are rebuilt, how much memory each container may use, where logs go and who may start what. On a cluster, management adds tools to see and control many orchestrated workloads at once. Our Container orchestration article covers the scheduling side.

Where should images be stored?

In a registry you trust, ideally one you run. Pulling straight from public registries exposes you to rate limits, removed tags and the occasional poisoned image. A private registry on one of your servers caches the bases you use and stores your own builds. The open-source Distribution registry runs in one container; Harbor adds a web interface, vulnerability scanning and replication between sites.

podman run -d --name registry -p 127.0.0.1:5000:5000 \
  -v /srv/registry:/var/lib/registry:Z docker.io/library/registry:2
podman tag localhost/shop-api:2.4.1 localhost:5000/shop/api:2.4.1
podman push localhost:5000/shop/api:2.4.1

Publish it through a TLS reverse proxy with authentication rather than exposing port 5000 directly.

How should images be updated?

Rebuild on a schedule, deploy by digest, keep the previous version ready. Base images receive security fixes weekly or more, so rebuild your images regularly even when your code has not changed. Tag releases with versions, but deploy the immutable digest so a tag moved later cannot change what runs. Rolling back then means redeploying the previous digest, a seconds-long operation. Tools such as Renovate open pull requests when base images or dependencies change.

Why set resource limits?

So one container cannot starve the rest. Without limits, a memory leak in one service lets the kernel's out-of-memory killer choose a victim, possibly your database. Set memory limits a little above observed peaks, CPU limits where fairness matters, and a process count limit to stop fork storms:

docker run -d --name worker --memory=3g --memory-reservation=2g \
  --cpus=2.5 --pids-limit=512 --restart=unless-stopped registry.example.net/worker:1.9

Watch the actual use with docker stats or podman stats for a week, then tighten the figures.

Where do container logs go?

To standard output, then to a collector. Containers should log to stdout and stderr and let the runtime capture it; configure the runtime to rotate local copies, because the default JSON log driver can fill a disk. Ship logs to a central store such as Loki or OpenSearch so they survive container removal and can be searched across services. Pair them with metrics from cAdvisor or the runtime's own exporter scraped by Prometheus.

{ "log-driver": "local", "log-opts": { "max-size": "50m", "max-file": "5" } }

That file, /etc/docker/daemon.json, caps each container at about 250 MB of local logs.

What does container security involve?

Small images, no root, scanned contents and a patched host. Build from minimal bases, run processes as an unprivileged user, drop Linux capabilities the service does not need and mount the root file system read-only where possible. Scan images in the pipeline and again on a schedule, since new vulnerabilities are published daily. Rootless Podman or Docker in rootless mode keeps a container escape from becoming root on the host. Our DevSecOps article ties these checks into a pipeline.

Which management tools are common?

For one or a few hosts: Docker Compose or Podman with systemd units, plus a web interface such as Portainer or Cockpit if you prefer clicking. For clusters: Rancher, Lens or the Kubernetes dashboard, with Argo CD or Flux applying the desired state from a Git repository. Choose the lightest tool that handles your scale; Compose files under version control are management enough for many small teams.

What does a container host need?

Memory first, then cores and fast disk for image layers and volumes. ESSENTIAL-M with 64 GB DDR5 and NVMe storage hosts dozens of services for $70.80 a month. Keep a separate machine for the registry and builds if images are large or frequent, so a heavy build never slows production. Our CI runners and build farms page sizes build machines.

Servers sized for many containers

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-SAMD Ryzen 7 9700X864 GB2x 512 GB SSD NVMe1 Gbps unmetered$46.20
ESSENTIAL-MAMD Ryzen 9 9900X1264 GB2x 512 GB SSD NVMe1 Gbps unmetered$70.80
ESSENTIAL-LAMD Ryzen 9 9950X16128 GB2x 960 GB SSD NVMe1 Gbps unmetered$106.20
BUSINESS-2 2024AMD EPYC 4344P864 GB2x 960 GB SSD NVMe3 Gbps unmetered$109.80

Related pages

Container orchestration

Running containers across many machines: scheduling, desired state, service discovery, rolling updates, self-healing and the tools that do it on bare metal.

Read more

Containerisation

Packaging an application with its libraries so it runs the same everywhere: namespaces, cgroups, images, runtimes and running containers on bare metal.

Read more

Kubernetes and Docker

Docker builds and runs containers; Kubernetes schedules them across machines. What each does, where Compose is enough, and running both on dedicated servers.

Read more

CI runners and build farms

High clock Ryzen and many-core EPYC machines for CI runners, container builds and compile farms that finish faster.

Read more

Questions and answers

Do I need Kubernetes to manage containers?

No. On one or a few servers, Docker Compose or Podman with systemd units manage containers well. Kubernetes helps once many hosts and services are involved.

Why deploy images by digest instead of tag?

A digest identifies exact image contents and cannot change, while a tag can be moved to a different image. Digests make deployments and rollbacks reproducible.

What keeps container logs from using up disk space?

Configure log rotation in the runtime, for example the local log driver with a maximum size and file count, and ship logs to a central store.

Should containers run as root?

No. Run processes as an unprivileged user inside the container and prefer rootless runtimes, so an escape does not grant root on the host.

Can I run a private container registry on a dedicated server?

Yes. The open-source registry or Harbor runs well on any of our machines; publish it through a TLS reverse proxy with authentication.