本文共 989 字,大约阅读时间需要 3 分钟。
yum install epel-releaseyum install axel vim git curl wget lrzsz gcc python-devel yum* python-pip
设置docker官方repo,安装docker CE版本
yum-config-manager \--add-repo https://download.docker.com/linux/centos/docker-ce.repoyum install -y docker-cedocker -v
配置docker
mkdir /etc/systemd/system/docker.service.dtee /etc/systemd/system/docker.service.d/docker.conf << 'EOF'[Service]MountFlags=sharedEOF
编辑 /usr/lib/systemd/system/docker.service
# ExecStart=/usr/bin/dockerdExecStart=/usr/bin/dockerd --insecure-registry 192.168.10.139:4000
启动docker
systemctl daemon-reloadsystemctl restart dockersystemctl enable dockerdocker info
registry服务器
docker run -d -v /opt/registry:/var/lib/registry -p 5000:5000 \--restart=always --name registry registry:2
监控系统
涉及很多软件,很有代表性:Prometheus,grafana,alertmanager,exporters
Prometheus
docker run -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml \ prom/prometheus