安裝CentOS 7
下載一個(gè)CentOS 7 精簡版:
http://mirrors.163.com/centos/7/isos/x86_64/
選擇:CentOS-7-x86_64-Minimal-1503-01.iso
安裝好后,,配置ip地址,保證能上網(wǎng)。
安裝Docker
根據(jù)官方安裝說明,,https://docs./installation/centos/
$ cat >/etc/yum.repos.d/docker.repo <<-EOF
[dockerrepo]
name=Docker Repository
baseurl=https://yum./repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum./gpg
EOF
# yum install docker-engine
# service docker start
安裝Docker-compose
先安裝pip
# wget https://raw./pypa/pip/master/contrib/get-pip.py
# python get-pip.py
再安裝compose
# pip install docker-compose
測試案例
下載測試代碼
# git clone https://github.com/jiekechoo/docker-haproxy
運(yùn)行
# cd docker-haproxy
# docker-compose up
瀏覽器打開本機(jī)IP:http://192.168.1.230
|