What is a software container?
A software container is an isolated process environment that runs an application with its libraries and dependencies. It aims to reduce differences between development computers and servers. Docker and similar tools simplify container workflows.
Images, containers and persistent data
An image is a packaged template containing application files and runtime definitions; a container is a running instance created from that image. Multiple instances can use the same image. Containers share the host kernel, unlike virtual machines that each run a complete guest operating system. Different mechanisms enforce process, filesystem and resource boundaries. Recreating a container can discard data in its temporary writable layer. Persistent information, such as a database, belongs in an appropriate volume or external storage. Embedding passwords and access keys in an image risks exposing them to anyone who obtains the package; secrets should be supplied through controlled runtime mechanisms.
Deployment benefits and limitations
Containers make it easier to replicate test environments, move application versions and scale horizontally. Several instances of a web application can run behind a load balancer. Packaging does not fix defective code or incorrect network settings, however. Image sources should be verified, dependencies updated, unnecessary privileges removed and memory limits defined. Sharing the host kernel matters when assessing security. Orchestration tools can manage starting, restarting and service discovery across many containers. These tools organize operations but add complexity; an infrastructure larger than a small application needs can increase maintenance work.