Why did shipping software in containers change how it runs?
A program in a container may believe it owns the whole computer, yet it sees only what it has been given.
βΆ Start the storyContainers changed how software runs because a program can now travel together with everything it needs, and run in the same way anywhere. A container is not a whole imitation computer. It is an isolated slice of one operating system: the allows multiple isolated instances, and a program inside one can only see the container's contents and the devices assigned to it, while a program on an ordinary system sees every resource of the machine.
Before this, organizations ran applications on physical servers with no way to define resource boundaries between them, which caused resource allocation problems. Virtual machines solved that by giving each application a full machine with its own operating system. Containers are similar, but with relaxed isolation, because they share the host's operating system. That makes them lightweight, and it usually means less than full virtualization, since no emulation or intermediate virtual machine is needed.
Virtual machine
- A full machine with its own operating system
- Isolated on virtualized hardware
Container
- Shares the host operating system
- Considered lightweight
- Usually less than full virtualization
- Cannot host a different
The idea has deep roots. On Unix-like systems it is an advanced version of , a mechanism introduced in Version 7 Unix in 1979 that changes the apparent root folder of a process. Docker, the tool that made containers easy to package and ship, came from Solomon Hykes, who started it as an internal project at dotCloud, a company in France. Docker debuted at PyCon in Santa Clara and was released as open source in March 2013.
Its promise was environmental consistency: a container runs the same on a laptop as it does in the cloud. There is a trade-off, however. Because containers share one , they cannot host a different operating system kernel, and security threats can affect the whole containerized system.
Quiz me
0/3
Recap
Containers share the host's kernel, so they are lighter than virtual machines, but cannot run a different kernel.
π‘ A trick to remember it Β· A virtual machine is a house with its own foundation; a container is a flat in a shared block, with its own door and walls but the same foundation.
Surprising fact Β· Containers descend from chroot, introduced in Version 7 Unix in 1979.
Connects to
- πͺ How can one computer pretend to be many?
- βοΈ How did an online store become the world's biggest renter of computers?
- βΈοΈ How does Kubernetes keep thousands of containers running?
- π§± What really keeps one container from seeing another?
- π¦ Why is every shipping container the same size, and who made them so?
Sources (5)
No source, no claim. Every fact in this lesson (18 claims) cites at least one of these.