{"head":{"title":"What Is a Software Container? Definition | OceanLab","description":"A container packages an app with everything it needs to run, so it behaves the same on a laptop and in production. How it works, an example and mistakes.","canonical":"https://oceanlab.in/glossary/container"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"container","path":"/glossary/container"}],"slug":"container","term":"Container (software)","aka":["Docker container","container image"],"category":"Hosting and delivery","short":"A package that holds an application and everything it needs to run, isolated from other software on the same machine.","body":[["A container image bundles the app code, runtime, libraries and settings. Running that image gives a container: an isolated process that shares the host's operating system kernel but has its own files and network. Containers start in seconds and are much lighter than virtual machines."],["Images follow open standards, so the same image runs on a laptop, in ",{"href":"/glossary/ci-cd","text":"CI"}," and on any cloud. To run many containers across many machines, teams use an orchestrator such as ",{"href":"/glossary/kubernetes","text":"Kubernetes"}," or a managed container service."]],"why":["Containers end it works on my machine. What was tested is exactly what ships. They also make it easier to move between hosting providers, which helps avoid lock-in, and to scale parts of a system on their own."],"example":["A data team's report builder needs a specific Python version and system libraries. Packaged as a container, it runs the same in development, in tests and on the managed container service in production, and a new engineer is set up in minutes."],"inBuild":["We build one image per service in the pipeline, keep images small, run as a non-root user and scan them for known vulnerabilities. Config and secrets come from the environment, never baked into the image."],"mistakes":[["Putting secrets inside the image, where anyone with the image can read them."],["Huge images with build tools left in, which are slow to ship and have more holes."],["Storing data inside the container, which is lost when it restarts."]],"related":[{"href":"/glossary/kubernetes","label":"Kubernetes (K8s)","detail":"An open source platform that runs and manages containers across a group of machines: starting them, restarting them, scaling them and routing traffic to them."},{"href":"/glossary/serverless","label":"Serverless","detail":"A cloud model where the provider runs your code on demand and manages the servers, and you pay for what you use rather than for idle machines."},{"href":"/glossary/ci-cd","label":"CI/CD (continuous integration and delivery)","detail":"An automated pipeline that builds and tests every code change (CI) and then releases it to users in a repeatable way (CD)."},{"href":"/glossary/infrastructure-as-code","label":"Infrastructure as code (IaC)","detail":"Defining servers, networks, databases and other cloud resources in code files that are versioned and applied automatically, instead of setting them up by hand."},{"href":"/glossary/microservices","label":"Microservices","detail":"A way of building an application as many small services, each owning one job and its own data, deployed independently."}],"tools":[],"links":[{"href":"/pricing/categories/cloud-hosting","label":"Cloud hosting pricing","detail":"Hosting prices side by side, with sources."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}