Using docker to build haproxy stable version RPM on CentOS
561
The resulting RPM will be in image's /root/rpmbuild/RPMS/x86_64
update the version in download.sh
download the RPM file
./download.sh
# for example, you'd like to build for haproxy v1.6.5 on centos 7
git clone https://github.com/BWITS/haproxy-builder.git
cd haproxy-centos7-v1.6
# adjust the version in Dockerfile if new version on the market.
tag=1.6.5
centos=7
docker build -t haproxy:centos${centos}-v{tag} .
id=$(docker create haproxy:${centos}-v${tag})
docker cp $id:/root/rpmbuild/RPMS/x86_64/haproxy-${tag}-1.x86_64.rpm .
docker rm -v $id
# You can delete the image to release the space, uncomment below line
# docker rmi -f bwits/haproxy:${centos}-v${tag}
ls -l haproxy-${tag}-1.x86_64.rpm
Content type
Image
Digest
Size
160.4 MB
Last updated
over 10 years ago
docker pull bwits/haproxy:centos6-v1.6.5