1.拉取haproxy镜像
现在无法拉取镜像
bash
docker pull 镜像
只能通过下载镜像包,再加载到docker中
2.只下载软件包
3.拆分软件包

4.复制haproxy配置文件
创建目录

进入/mnt/etc,复制haproxy到docker数据卷的默认位置下/var/lib/docker/volumes/


5.修改HAProxy配置文件

6.查看镜像信息
获取docker对应的haproxy,默认配置文件存放位置
7.编排容器
(1)创建test目录

(2)容器编排

8.启动容器编排


9.输入到nginx的默认发布目录
启动容器后,自动创建了data_web1和data_web2两个目录
10.测试
