S
S
Sergey Doniy2018-02-23 13:41:35
Docker
Sergey Doniy, 2018-02-23 13:41:35

What happens when you run a Docker container?

In my head, I understand how the container starts, what is being done, but as it turned out, I’m not sure of my knowledge, and I ask you to correct me if I’m wrong in something or forget something:
Initial data:
1. Ready php:fpm-7.2 image
2. The created container
Run the container:
docker start container-name
What happens at this moment:

  1. Connecting to the docker daemon
  2. Search for a specified container
  3. Creating a write layer in a container image that will be destroyed after stopping
  4. Allocating resources for startup (storage, memory, cpu), connecting to networks (if specified)
  5. Adding links
  6. Running a container:
    1. Checking the availability of ports that are forwarded outside
    2. Checking availability of volumes, if any
    3. Setting the working directory and environment variables
    4. Adding hosts (if any)
    5. Launching an Entrypoint Container
    6. Starting services (executing CMD content)
    7. Execution of commands to check the health of the container (healthcheck) - starts at startup and runs at a certain interval for polling

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question