Docker

Study Notes: Configuring DNS Separately for Docker

1\. Configuration file: Format: json Generally, a freshly installed Docker won't have this file. Just use vi or another editor to add the following content dire

1. Configuration file: /etc/docker/daemon.json

2. Format: json

Generally, a freshly installed Docker won't have this file. Just use vi or another editor to add the following content directly:

{

"dns": ["223.5.5.5", "223.6.6.6"]

}

3. Verification

docker run --rm -it alpine nslookup baidu.com

The Server line in the output shows the DNS just configured, indicating the configuration was successful.

N
norvyn

独立 iOS 开发者,写字的人。在一座有海的城市,慢慢地做一些小而确定的东西。An independent iOS developer and writer — slowly making small, certain things in a city by the sea.

评论Comments

加载中…Loading…

留下评论Leave a comment