In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to configure the Docker daemon, which has a certain reference value. Interested friends can refer to it. I hope you can learn a lot after reading this article.
Install Docker and start it, and there is always a Docker daemon, dockerd, running on the server where Docker is located.
To start the Docker daemon manually by default, you only need to execute the following command:
Dockerd
To stop the above process, all you need is the CTRL+C keyboard command.
1. Configuration file for dockerd
If you want to start the Docker daemon with non-default configuration parameters, you can set the startup options for the dockerd command when you start the Docker daemon, but obviously this requires notifying dockerd before starting dockerd.
If you want to change the configuration parameters of dockerd without stopping dockerd, it is recommended to use a configuration file (JSON format).
Default configuration file / etc/docker/daemon.json for the Docker daemon. It may not exist initially and can be created manually.
If you want to use a different configuration file, you need to give the path to the configuration file when you start dockerd:
Dockerd-config-file path_to_your_config_file
Example: turn on debug mode of dockerd through configuration file
1) Edit configuration file
Vi / etc/docker/daemon.json
{"debug": true}
2) reload the configuration (do not restart dockerd)
Sudo kill-SIGHUP $(pidof dockerd)
In this way, you can see the debug log information in the default log file / var/log/messages of the Docker daemon.
2. Dockerd's log
The log level of dockerd defaults to info.
To change the log of dockerd to debug, in addition to the above usage configuration file, you can also restart dockerd and provide the startup parameter-D or-- debug. The example is as follows:
Dockerd-D
The log file of dockerd, which defaults to / var/log/messages, can also be redirected to other log files, as shown in the following example:
Dockerd-D > > log_file 2 > & 1
3. Log level of dockerd
Dockerd supports log levels debug, info, warn, error, fatal. The default log level is info.
If necessary, you also need to set the log level, either through the configuration file or through the startup parameter-l or-- log-level.
Method 1: configuration file / etc/docker/daemon.json
{"log-level": "debug"}
Method 2:
Dockerd-log-level debug dockerd-l debug Thank you for reading this article carefully. I hope the article "how to configure the Docker daemon" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.