1. Home
  2. Blog
  3. Custom Software

Custom Software

What Is a Container in Software? Images, Resource Limits, Health Checks and Orchestration Guide

What is a container in software? Images, layers, containers vs virtual machines, requests and limits, orchestration, security and when you need none.

Contents 15 sections
  1. What Is a Container in Software?
  2. How Does a Container Differ From a Virtual Machine?
  3. What Are an Image and a Layer?
  4. Why Does "The Same Package in Every Environment" Matter?
  5. How Do You Give a Container a Resource Request and Limit?
  6. How Does a Health Check Work?
  7. What Are Stateless and Stateful Services, and Where Does Data Live?
  8. What Is Orchestration and What Does It Do?
  9. How Is Container Image Security Ensured?
  10. How Are Secrets Stored in Containers?
  11. When Is a Container Not Needed?
  12. How Do You Compare the Three-Year Cost of Containers?
  13. How Do You Move to Containers?
  14. Custom Software and Deployment With İnovabil
  15. Frequently Asked Questions

An application runs fine on the developer's laptop, fails in the test environment because a library version differs, and then refuses to start in production because of a different setting. A container solves this by putting the application and everything it needs to run into one package. This guide answers what is a container in software, from a development and operations point of view, in plain language.

We cover images, virtual machines, resource limits, health checks, stateful services, orchestration, security, three-year cost and when you do not need a container. All example figures are representative, not a price or measurement of any product.

Key ideaA container is not a security or speed miracle; it is a packaging format. You place the application and its dependencies in the same box and run the same box in every environment. The real gain appears when you start managing boxes by the dozen, which is orchestration. With only a few services, that gain can be smaller than the operating burden it brings.

What Is a Container in Software?

A container runs an application's code, runtime, libraries and settings inside one isolated package. The application inside sees its own file system, network address and process list, but it shares the host machine's operating system kernel with other containers. Because it does not carry a full operating system, it is small and starts in seconds.

Think of a shipping box: the ship does not care what is inside, and the box is unloaded the same way at every port. In software the same box behaves the same on a developer machine, in testing and in production. A container is not an architecture decision; a monolithic application can run in one too. We cover the decision to split into services in our microservices architecture guide.

We recommend reading: What Is Custom Software? Types, Layers and Cost Logic

How Does a Container Differ From a Virtual Machine?

A virtual machine imitates a full computer with its own operating system. A container shares the kernel and packages only the application and its dependencies. The table summarizes the general tendency; real values vary from setup to setup.

TopicVirtual machineContainer
What it packagesOperating system and applicationApplication and its dependencies
KernelEach machine has its ownHost kernel is shared
Typical sizeGigabytesMegabytes
StartupMinutesSeconds
IsolationStrong; at hardware levelAt operating system level
How many fit on one hostFewMany

Let us look at density. On a 16 GB machine, set aside 2 GB for the operating system and management, leaving 14 GB. At 4 GB per virtual machine, 14 ÷ 4 = 3.5, so 3 machines fit. If 256 MB is enough per container, 14 × 1,024 = 14,336 MB; 14,336 ÷ 256 = 56 containers fit. The ratio is 56 ÷ 3 ≈ 18.7 times. The calculation holds only if the application really runs within 256 MB; workloads that need strict isolation may still prefer a virtual machine.

What Are an Image and a Layer?

An image is the unchanging template of a container; a container is the running form of that image. An image is built from stacked layers: base system files, the application's dependencies, and your own code on top. When a layer changes, only that layer and the ones above it are rebuilt and shipped.

Leaving build tools inside the image inflates it. A multi-stage build compiles the application in a tool-filled environment first, then copies only the files needed at runtime into a clean image. In a representative example the single-stage image is 1,200 MB and the multi-stage image is 180 MB: 1 − 180 ÷ 1,200 = 85% reduction.

Container image size: 1.2 GB with a single-stage build, 180 MB with a multi-stage build, an 85 percent reduction
Image size: storage and transfer time fall by the same ratio.

Let us see the effect with 20 services × 6 versions = 120 images.

  • Storage: 120 × 1,200 MB = 144 GB; with the reduced image, 120 × 180 MB = 21.6 GB.
  • Transfer: if we take a 1 Gbit/s network as about 125 MB/s, 1,200 ÷ 125 = 9.6 s; 180 ÷ 125 = 1.44 s.
  • Layer sharing: say the base is 60 MB, dependencies 100 MB and code 20 MB (180 MB in total). If the base is shared and each image's own 120 MB is unique, storage drops to 120 × 120 + 60 = 14,460 MB (33.1% less). If only the code layer changes between versions, it drops to 20 × (100 + 6 × 20) + 60 = 4,460 MB, a 79.4% reduction; a code change sends only 20 MB over the network.

That is why frequently changing code goes on the top layer and rarely changing dependencies go lower.

Why Does "The Same Package in Every Environment" Matter?

The same image runs in development, test, staging and production; only the settings differ between environments, and they are supplied from outside. We describe environment separation in our software environments guide.

Let us see the risk of manual setup as a probability. Suppose an environment setup has 14 manual steps, each with a 2% chance of error, and treat the steps as independent. The probability of an error-free setup is 0.9814 ≈ 0.754, or 75.4%; one setup in four (24.6%) goes wrong somewhere. When setup shrinks to the single step "run the image", the same assumption gives 98%. The logic is simple: the number of steps drives the number of errors. This approach combines with a CI/CD pipeline: the pipeline builds the image once and promotes the same image between environments, so what you tested is what goes to production.

How Do You Give a Container a Resource Request and Limit?

There are two values: the request (the guaranteed amount) and the limit (the ceiling that cannot be exceeded). The scheduler places by request; the limit stops a heavy container from starving its neighbors.

Say the request is 0.25 CPU, the limit is 0.5 CPU and the node has 8 cores. By request, 8 ÷ 0.25 = 32 containers fit. If you want to use the node only up to 70%, then 8 × 0.7 = 5.6 cores are available; 5.6 ÷ 0.25 = 22.4, so 22 containers are placed. If all of them hit their limit at once, demand is 22 × 0.5 = 11 cores, which is 11 ÷ 8 = 137.5% of the node. All of them peaking together is unlikely, but if the sum of limits is far above capacity, busy hours bring slowdowns. To tune limits against real usage, see our software monitoring guide.

Memory differs: exceeding the CPU limit throttles the container, exceeding the memory limit usually terminates it, so keep the memory limit close to the request.

How Does a Health Check Work?

A container that looks like it is running is not necessarily healthy; the process can be alive and stuck. There are two checks:

  • Liveness check: restarts the container if the application is stuck.
  • Readiness check: takes the container out of traffic while it starts or is temporarily overloaded, and puts it back when ready.

Say the check runs every 10 s and 3 consecutive failures count as a fault. If the fault occurs just before a check, detection takes about 20 s; just after, about 30 s. With a 20 s restart and 10 s to become ready, the total is 50 to 60 s. With 10 replicas and 100 requests per second, each replica gets 10 requests per second; if the faulty replica stays in traffic for 30 s, 300 requests are affected (assuming all of them fail). If a readiness check with a 5 s interval and 2 failures removes the replica in 10 s, affected requests drop to 100 (a 66.7% reduction).

What Are Stateless and Stateful Services, and Where Does Data Live?

A container's file system is temporary: anything written into it is lost on restart. That is why the easiest service for a container is a stateless one; persistent data lives in an outside database or store, and any replica can be lost. A stateful service (database, file store, queue) keeps persistent data itself; it can run in a container, but the data must be written to a persistent volume and backups must be planned separately.

A classic trap: the application writes uploaded files to its own disk and 3 replicas run. If requests are spread randomly, the chance that the uploader's next request reaches the replica holding the file is 1 ÷ 3 = 33.3%. Writing to a shared store makes it 100%. For the security side of uploads see our secure file upload guide.

What Is Orchestration and What Does It Do?

Orchestration is the layer that automatically manages which machine each container runs on, how many replicas stay up, what happens on failure and how a new version rolls out. You write the desired state ("run 10 replicas of this service") and the orchestrator keeps pulling the real state toward that goal.

TaskWhat it doesRepresentative example
SchedulingPlaces the container on a suitable machine by request and limitUp to 22 replicas on an 8-core node
Automatic restartReplaces a container whose check failsNew replica within 50–60 s
Horizontal scalingAdds or removes replicas with load4 replicas at 90% load become 6
Rolling updateRolls out a new version in waves10 replicas, at most 2 down at once

The horizontal scaling rule: desired replicas = ceiling(current replicas × current load ÷ target load). With a 60% CPU target, 4 replicas running at 90% call for 4 × 90 ÷ 60 = 6 replicas; when load falls to 30%, 6 × 30 ÷ 60 = 3 replicas are enough. The target is 60% rather than 100% to leave room for the time a new replica needs to start (30 s in the example). We cover the concepts more broadly in our scalability guide.

A rolling update does not shut the old version down at once. If at most 2 of 10 replicas may be down at the same time, the update finishes in 10 ÷ 2 = 5 waves. If each wave takes 30 s, the total is 5 × 30 = 150 s, or 2.5 minutes, and capacity never falls below 80% (8 ÷ 10). Updating everything at once takes 30 s but the service stops completely for that time. If the new version fails the readiness check, the rollout stops; at most 2 replicas are stuck and 8 old replicas keep serving.

The effect on availability is measurable too. A single replica at 99.5% availability is down 216 minutes in a 30-day month (43,200 min). With two independent replicas the chance of both being down together is 0.0052 = 0.000025; downtime falls to 43,200 × 0.000025 = 1.08 min. This assumes independent failures; a shared database or node crash lies outside it, so spread replicas across machines.

How Is Container Image Security Ensured?

A container provides isolation but does not guarantee security by itself. The measures are defensive:

  • Small, trusted base image: the fewer the packages, the smaller the surface that can hold known flaws. In the representative example, when the package count fell from 480 to 90 (−81.25%), scan findings fell from 36 to 6 (−83.3%).
  • Regular vulnerability scanning: images are scanned when built and while running; the base image is refreshed regularly.
  • Signed images pinned by digest: running by an image's unchangeable digest instead of a moving tag such as "latest" means you deploy an image nobody can silently swap.
  • Least privilege: run as an unprivileged user, not an administrator, and keep the file system read-only where possible.
  • Component inventory: keep a list of the packages inside each image so that when a flaw is announced, the affected images are found within minutes.

We describe component records and update discipline in our secure software development guide. For personal data and compliance obligations, consult your legal counsel.

How Are Secrets Stored in Containers?

Passwords, keys and access credentials are not written into the image. The reason is the layered structure: if you write a secret in one layer and delete it in the next, the first layer still remains in the image and anyone who pulls the image can read it. Secrets are supplied at run time from a separate secret store or the orchestrator's secret mechanism; because the image holds no secrets, it can be shared safely. Each environment gets its own secrets and they are rotated regularly. See our secrets management guide for details.

When Is a Container Not Needed?

Containers and orchestration bring setup, monitoring, update and learning burdens. The table is a rough guide.

SituationSuggestion
Small application with one or two services and low trafficA simple server or a managed application service may be enough
Several services, frequent releases, environment drift problemsContainers (and CI/CD) are useful
Many services (for example 10 or more; the threshold is representative), automatic scaling, frequent rolling releasesConsider orchestration
Short, event-driven small jobsServerless execution may be an alternative

Say we have only 2 services. With a virtual machine at ₺4,000 per service per month and 0.5 person-days of management (₺9,000 per person-day), the cost is 2 × 4,000 + 0.5 × 9,000 = ₺12,500. With containers and an orchestrator, if you need one machine (₺6,000), an orchestrator operating share (₺8,000) and 1 person-day of management (₺9,000), the cost is ₺23,000; that is ₺10,500 more per month, or ₺378,000 over three years (excluding setup). For a small application, orchestration does not pay for itself. We compare the alternative in our serverless architecture article and the hosting choice in our cloud vs on-premise article.

How Do You Compare the Three-Year Cost of Containers?

Consider an application with 12 services. In the fixed setup each service has its own virtual machine. In the container setup the services are packed densely onto 3 larger machines and the orchestrator is billed as a managed service. All figures are representative.

Item (36 months)One virtual machine per serviceContainers and orchestrator
Infrastructure12 × ₺4,000 × 36 = ₺1,728,0003 × ₺6,000 × 36 = ₺648,000
Orchestrator operating share—₺8,000 × 36 = ₺288,000
Management effort3 person-days/month × ₺9,000 × 36 = ₺972,0001.5 person-days/month × ₺9,000 × 36 = ₺486,000
Migration setup (one-off)—40 person-days × ₺9,000 = ₺360,000
Three-year total₺2,700,000₺1,782,000

The difference is ₺918,000, or 34.0%. Monthly running savings: ₺48,000 − (₺18,000 + ₺8,000) = ₺22,000 on infrastructure and ₺27,000 − ₺13,500 = ₺13,500 on effort; ₺35,500 in total. Payback: ₺360,000 ÷ ₺35,500 ≈ 10.1 months. If the effort saving halves, savings are ₺28,750 and payback is about 12.5 months; with no effort saving at all it is ₺360,000 ÷ ₺22,000 ≈ 16.4 months. We describe managing the cloud bill in our cloud cost management guide.

How Do You Move to Containers?

Moving service by service lowers risk compared with moving everything at once.

Six steps to move to containers: pick a service, shrink the image, write the limits, data and secrets, rolling release, monitor and measure
The six steps of moving to containers.
  1. Pick a service: start with a stateless, self-contained service; leave services that hold data for last.
  2. Shrink the image: use a multi-stage build and a small base image; order layers by how often they change.
  3. Write the limits: define the CPU and memory request and limit, and the liveness and readiness checks.
  4. Data and secrets: keep persistent data outside the container; supply secrets from a secret store.
  5. Rolling release: limit how many replicas may be down at once; test the rollback path in advance.
  6. Monitor and measure: watch restart counts, resource use and scaling events; tune limits with real data.

Set a measurable goal for each step: number of setup steps, image size, restart time, release time. Common mistakes: skipping limits or checks, writing data to the container's disk, baking secrets into the image, and building orchestration too early.

Custom Software and Deployment With İnovabil

At İnovabil our focus is building company-specific software from scratch: custom software, ERP, CRM, e-commerce, web, mobile and integration. Which way of running it fits depends on the software's architecture, the number of services and your team's operating capacity; we recommend writing that decision down in requirements analysis together with its cost and limits. We do not claim to offer a container or orchestration service; the framework here is a guide you can use for your own decision.

We built CRM, purchasing and mobile for Avcılar İnşaat; a purchasing system for İZBAN; logistics and shipment planning with wholesale order management for Karyak; and warehouse management with a complaint and support management system for Sleepy. Send us a short summary of your application's structure and operating expectations; we will settle the runtime and release setup together during analysis.

We recommend reading: Our software development process: from analysis to release, step by step

Frequently Asked Questions

What is a container in software and what is it for?

A container runs an application together with its dependencies in one isolated package. The same package behaves the same in every environment, so "it worked on my machine" problems shrink and deployment gets faster.

What is the difference between a container and a virtual machine?

A virtual machine imitates a full computer with its own operating system; a container shares the host's kernel and packages only the application. So a container is smaller, starts in seconds and many more of them fit on one machine; its isolation is not as strict as a virtual machine's.

Are an image and a container the same thing?

No. An image is the unchanging template; a container is the running form of that image. Any number of containers can be created from one image.

When is orchestration needed?

When you manage many services and replicas and want automatic scaling, self-healing restarts and rolling updates. For a small application with two or three services the operating burden can exceed the gain; in the example, two services cost ₺10,500 more per month.

Do containers make an application secure?

Not by themselves. They provide isolation, but keeping components up to date, scanning for flaws, running with least privilege and keeping secrets out of the image remain your responsibility. For compliance and personal data questions, consult your legal counsel.

Let's talk about your project

Tell us briefly about the software you have in mind; we'll listen and prepare a tailored roadmap and proposal.

Get a quote