目的:为了进行TCP代理
容器镜像是基于centos:centos7.9.2009进行封装
运行: docker run -d --name haproxy --privileged=true -p 80:80 --restart=always haproxy:tag /usr/sbin/init
haproxy目录 :/etc/haproxy
haproxy 主配置文件:/etc/haproxy/haproxy.cfg
监听本地80端口,TCP传到后面的101.35.245.90的8090端口
vim /etc/haproxy/haproxy.cfg
frontend eshop *:80 default_backend websrvs
backend websrvs balance roundrobin server web1 116.55.195.73:8090 check
haproxy日志【在haproxy容器中】:/var/log/haproyx/haproxy.log
Content type
Image
Digest
sha256:a34a696cf…
Size
152.8 MB
Last updated
about 4 years ago
docker pull aiaiduo/haproxy:1.0