Home > other >  The relationship between the docker container and image
The relationship between the docker container and image

Time:09-22

Novice consult, my understanding is that the image is one container (such as OS, database applications such as image), then through the command to the container into the image, after installed the docker, want to install an ubuntu image, in order to create a container, and then run such an image, or directly run docker hub after download ubuntu on the image, will generate a container directly, an image (through the docker ps, docker images to view),
Direct docker docker after installed, run the hello world, docekr ps shows no container, docker images show such an image, docker info display container: 1, here have a container, this is why, what's the difference between two?

CodePudding user response:

Problem a lot, I comb:
Problem a: the connection between the Image and the Container,
The concept of image are more likely to be an environmental package, this package can be moved to any Docker platform environment to run; And the container is you run environment package for instance; You can run against the environmental package N instance,
Question 2: why Docker info shows that there is a container; The docker ps really can't see,
A: "docker ps" default will only display the running container, if you want to see all you need to use "docker ps - a";" Quantity of the docker info "shows the total number of containers,
Question 3: mirror with container order,
The mirror again, of course, is the first instance, although create mirror can refer to a container, but the standard approach is to first make mirror and then run the container,

CodePudding user response:

The container is the expression of images,

CodePudding user response:

Mirror, installed the operating system of the iso image with you a concept,
Container, which is based on the image to start the operating system,
A mirror, can be used in various places to start any more containers, which is a mirror that can hold a lot of an operating system,
Mirror, of course, not necessarily be the mirror image of the operating system can also be a mirror image of the software, after waiting for you to understand, you will know that I this explanation is not entirely right, but you can understand so,
Actually, you can not understand, just to the right will use the concept and theory, and then look back suddenly understand,

CodePudding user response:

The inside of the mirror is your CD system, container is your desktop that has installed

CodePudding user response:

The relationship between image and container relationship feels like a procedure and process
  • Related