The difference between docker images and containers

Release: 2020-04-02 15:06:14
Original
6180 people have browsed it

The difference between docker images and containers

The entire life cycle of docker consists of three parts: image, container, and repository.

Let’s take a look at the difference between docker images and containers:

The concept of docker images is similar to the image of a virtual machine. It is a read-only template, an independent file system, including the data required to run the container, which can be used to create new containers.

Docker images are actually composed of layers of system files. This level of file system is called UnionFS (Union file system). The image can be built based on dockerfile, which is a description file, which contains several secret commands. Each command creates a new hierarchical structure for the underlying file system.

Docker uses containers to run applications: docker containers are running instances created by docker images. Docker containers are similar to virtual machines and can be started, stopped, deleted, etc.

Each container is isolated from each other. A specific application will be run in the container, including the code of the specific application and the required dependency files. You can think of a container as a simplified version of the Linux environment (including root user permissions, process space, user space, network space, etc.) and the applications running in it.

For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.

The above is the detailed content of The difference between docker images and containers. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!