标签:run manager creat nts func dev containe style util
Docker
The Docker itself is a software container platform which allows us to create and manage containers.
There are Docker Engine, Docker client.
https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine
http://artemstar.com/2017/07/23/docker-os-images
Why needs virtualization
- running multiple instances of an application or running different versions of the same application at the same time. For example, running multiple instances of nginx would require changing its init script, as well as its configs because we can’t bind more than one application to the same port.
- Running several OS
- Python has provided a module to create its virtual environment (path of package or runtime lib)
Virtual Machine
VM hey are often used in cases when we need to provide computing resources to different people. Virtual machines allows us to allocate the exact number of computing resources to meet the client’s requirements, and if there’s some resources left we can allocate it to another client.
Hypervisor: translate guest OS kernel code to software instructions
Hypervisor abstracts the underlying hardware (virtualizes it) to provide the same hardware to several operating systems
Containers are an abstraction at the OS layer.
Linux container:
Under the hood, Docker is built on the components:
cgroups and namespaces capabilities of the Linux kernel
- cgroups, which stands for control groups, are a kernel mechanism for limiting and measuring the total resources used by a group of processes running on a system
- Namespaces are a kernel mechanism for limiting the visibility that a group of processes has of the rest of a system
So a docker image doesn’t need to contain a OS image, all it needs is a bundle of dependencies of target.
Create base image: https://docs.docker.com/develop/develop-images/baseimages/
But usually, we will create image based on an OS image, like Ubuntu
- ubuntu container images is stripped down image of a real operating system which doesn’t include kernel, but does have some libs and utilities specific to Ubuntu distro.
- it facilitates troubleshooting. For instance, OS image may have a shell installed
- this is a package manager
windows container
With the introduction of Windows Server 2016 Technical Preview 3 in August 2015, Microsoft enabled the container technology on the Windows platform
the Kernel Mode of an operating system has been implemented for drivers that need to have unrestricted access to the underlying hardware.
In the User Mode, the code always runs in a separate process (user space),
Linux exposes its kernel level functionalities via syscalls, Microsoft decided to control their kernel mode outbound functionalities via DLL’s
In Windows containers you’ll see a bunch of extra System Processes running while Linux containers only have to run the specified Application Processes
标签:run manager creat nts func dev containe style util
原文地址:https://www.cnblogs.com/resibe-3/p/10880665.html