[root@dev129 docker]# docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Head "https://registry-1.docker.io/v2/library/hello-world/manifests/latest": dial tcp: lookup registry-1.docker.io on 192.168.2.1:53: no such host.
解决方案
修改/etc/resolv.conf配置
老DNS配置
1
2
3
## Generated by NetworkManager
nameserver 192.168.2.1
nameserver 8.8.8.8
新DNS配置
1
2
3
## Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4
[root@dev127 etc]# cat prometheus.yml # my global configglobal:scrape_interval:15s# Set the scrape interval to every 15 seconds. Default is every 1 minute.evaluation_interval:15s# Evaluate rules every 15 seconds. The default is every 1 minute.# scrape_timeout is set to the global default (10s).# Alertmanager configurationalerting:alertmanagers:- static_configs:- targets:# - alertmanager:9093# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.rule_files:# - "first_rules.yml"# - "second_rules.yml"# A scrape configuration containing exactly one endpoint to scrape:# Here it's Prometheus itself.scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.- job_name:"prometheus"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.127:8082"]- job_name:"docker-dev129"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.129:8085"]- job_name:"redis-dev127-paoshang"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.127:9121"]- job_name:"node-dev127"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.127:8084"]- job_name:"node-dev129"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.129:8084"]- job_name:"node-win158"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.158:9182"]- job_name:"node-win189"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.189:9182"]- job_name:"node-win118"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets:["192.168.2.118:9182"]