There are two ways to configure the Docker daemon:
- Использование файла конфигурации JSON.
Это предпочтительный вариант, поскольку он хранит все конфигурации в одном месте.
- Использование флагов при запуске dockerd.
You can use both of these options together as long as you don’t specify the same option both as a flag and in the JSON file. If that happens, the Docker daemon won’t start and prints an error message.
$ dockerd --debug --tls=true --tlscert=/var/docker/server.pem --tlskey=/var/docker/serverkey.pem
--host tcp://<Host_IP>:2376
- Можете ли вы перечислить причины, почему контейнерные сети так важны?
Below are top 5 reasons why we need container networking:
- Containers need to talk to external world.
- Reach Containers from external world to use the service that Containers provides.
- Allows Containers to talk to host machine.
- Inter-container connectivity in same host and across hosts.
- Discover services provided by containers automatically.
- Load balance traffic between different containers in a service.
- Provide secure multi-tenant services.
Итог
Key takeaway for interview: Describe how many ways are available to configure Docker daemon?