What is a container?
A container is an isolated environment in which an application runs with all its required dependencies (libraries, packages, configs), but without its own separate operating system. It uses the host OS's shared kernel, but behaves as if it were in a separate space.
Main properties of a container:
- Isolation - a container does not interfere with other processes and does not conflict with other libraries' versions.
- Predictability - the application behaves the same way on any computer or server.
- Lightness and speed - containers take up few resources and start in a fraction of a second.
- Repeatability - a container can be rebuilt and run again in exactly the same way.
In short: a container is a "packaged application with its environment" that can be moved and run anywhere, without manually configuring the system.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.