Skip to content

Commit c383fee

Browse files
committed
Add 3.2 branch
1 parent c023a41 commit c383fee

File tree

7 files changed

+207
-7
lines changed

7 files changed

+207
-7
lines changed

.github/workflows/docker_auto.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
env:
1414
DOCKER_PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64
1515
DOCKER_IMAGE: haproxytech/haproxy-debian
16-
STABLE_BRANCH: "3.0"
16+
STABLE_BRANCH: "3.1"
1717
steps:
1818
- name: Login to Docker Hub
1919
id: login_docker

.github/workflows/docker_manual.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
packages: write
1010
strategy:
1111
matrix:
12-
branch: ["2.2", "2.4", "2.6", "2.8", "2.9", "3.0", "3.1"]
12+
branch: ["2.2", "2.4", "2.6", "2.8", "2.9", "3.0", "3.1", "3.2"]
1313
env:
1414
DOCKER_PLATFORMS: linux/amd64,linux/arm/v7,linux/arm64
1515
DOCKER_IMAGE: haproxytech/haproxy-debian
16-
STABLE_BRANCH: "3.0"
16+
STABLE_BRANCH: "3.1"
1717
steps:
1818
- name: Login to Docker Hub
1919
id: login_docker

3.1/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LABEL Version 3.1.0
2424
LABEL RUN /usr/bin/docker -d IMAGE
2525

2626
ENV HAPROXY_BRANCH 3.1
27-
ENV HAPROXY_MINOR 3.1.0
27+
ENV HAPROXY_MINOR 3.1.0-old
2828
ENV HAPROXY_SHA256 56a1468574ab411dcabde837f96bea6cf3c2eb90e279469f75ed1dcdc70fce11
2929
ENV HAPROXY_SRC_URL http://www.haproxy.org/download
3030

@@ -40,7 +40,7 @@ RUN apt-get update && \
4040
apt-get install -y --no-install-recommends procps libssl3 zlib1g "libpcre2-*" liblua5.4-0 libatomic1 tar curl socat ca-certificates libjemalloc2 && \
4141
apt-get install -y --no-install-recommends gcc make libc6-dev libssl-dev libpcre2-dev zlib1g-dev liblua5.4-dev libjemalloc-dev && \
4242
c_rehash && \
43-
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/devel/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
43+
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
4444
echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c - && \
4545
groupadd "$HAPROXY_GID" && \
4646
useradd -g "$HAPROXY_GID" "$HAPROXY_UID" && \

3.2/Dockerfile

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM golang:alpine AS builder
2+
3+
ENV DATAPLANE_MINOR 3.0.3
4+
ENV DATAPLANE_V2_MINOR 2.9.8
5+
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi.git
6+
7+
RUN apk add --no-cache ca-certificates git make && \
8+
git clone "${DATAPLANE_URL}" "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
9+
cd "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
10+
git checkout "v${DATAPLANE_MINOR}" && \
11+
make build && cp build/dataplaneapi /dataplaneapi && \
12+
make clean && \
13+
git checkout "v${DATAPLANE_V2_MINOR}" && \
14+
make build && cp build/dataplaneapi /dataplaneapi-v2
15+
16+
FROM debian:bookworm-slim
17+
18+
MAINTAINER Dinko Korunic <[email protected]>
19+
20+
LABEL Name HAProxy
21+
LABEL Release Community Edition
22+
LABEL Vendor HAProxy
23+
LABEL Version 3.2.0
24+
LABEL RUN /usr/bin/docker -d IMAGE
25+
26+
ENV HAPROXY_BRANCH 3.2
27+
ENV HAPROXY_MINOR 3.2.0-old
28+
ENV HAPROXY_SHA256 56a1468574ab411dcabde837f96bea6cf3c2eb90e279469f75ed1dcdc70fce11
29+
ENV HAPROXY_SRC_URL http://www.haproxy.org/download
30+
31+
ENV HAPROXY_UID haproxy
32+
ENV HAPROXY_GID haproxy
33+
34+
ENV DEBIAN_FRONTEND noninteractive
35+
36+
COPY --from=builder /dataplaneapi /usr/local/bin/dataplaneapi
37+
COPY --from=builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
38+
39+
RUN apt-get update && \
40+
apt-get install -y --no-install-recommends procps libssl3 zlib1g "libpcre2-*" liblua5.4-0 libatomic1 tar curl socat ca-certificates libjemalloc2 && \
41+
apt-get install -y --no-install-recommends gcc make libc6-dev libssl-dev libpcre2-dev zlib1g-dev liblua5.4-dev libjemalloc-dev && \
42+
c_rehash && \
43+
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/devel/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
44+
echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c - && \
45+
groupadd "$HAPROXY_GID" && \
46+
useradd -g "$HAPROXY_GID" "$HAPROXY_UID" && \
47+
mkdir -p /tmp/haproxy && \
48+
tar -xzf haproxy.tar.gz -C /tmp/haproxy --strip-components=1 && \
49+
rm -f haproxy.tar.gz && \
50+
make -C /tmp/haproxy -j"$(nproc)" TARGET=linux-glibc CPU=generic USE_PCRE2=1 USE_PCRE2_JIT=1 \
51+
USE_TFO=1 USE_LINUX_TPROXY=1 USE_LUA=1 USE_GETADDRINFO=1 \
52+
USE_PROMEX=1 USE_SLZ=1 \
53+
USE_OPENSSL=1 USE_PTHREAD_EMULATION=1 \
54+
USE_QUIC=1 USE_QUIC_OPENSSL_COMPAT=1 \
55+
ADDLIB=-ljemalloc \
56+
all && \
57+
make -C /tmp/haproxy TARGET=linux-glibc install-bin install-man && \
58+
ln -s /usr/local/sbin/haproxy /usr/sbin/haproxy && \
59+
mkdir -p /var/lib/haproxy && \
60+
chown "$HAPROXY_UID:$HAPROXY_GID" /var/lib/haproxy && \
61+
mkdir -p /usr/local/etc/haproxy && \
62+
ln -s /usr/local/etc/haproxy /etc/haproxy && \
63+
cp -R /tmp/haproxy/examples/errorfiles /usr/local/etc/haproxy/errors && \
64+
rm -rf /tmp/haproxy && \
65+
apt-get purge -y --auto-remove gcc make libc6-dev libssl-dev libpcre2-dev zlib1g-dev liblua5.4-dev libjemalloc-dev && \
66+
apt-get clean && \
67+
rm -rf /var/lib/apt/lists/* && \
68+
chmod +x /usr/local/bin/dataplaneapi && \
69+
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
70+
chmod +x /usr/local/bin/dataplaneapi-v2 && \
71+
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
72+
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
73+
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml
74+
75+
COPY haproxy.cfg /usr/local/etc/haproxy
76+
COPY docker-entrypoint.sh /
77+
78+
STOPSIGNAL SIGUSR1
79+
80+
ENTRYPOINT ["/docker-entrypoint.sh"]
81+
CMD ["haproxy", "-f", "/usr/local/etc/haproxy/haproxy.cfg"]

3.2/docker-entrypoint.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# first arg is `-f` or `--some-option`
5+
if [ "${1#-}" != "$1" ]; then
6+
set -- haproxy "$@"
7+
fi
8+
9+
if [ "$1" = 'haproxy' ]; then
10+
shift # "haproxy"
11+
# if the user wants "haproxy", let's add a couple useful flags
12+
# -W -- "master-worker mode" (similar to the old "haproxy-systemd-wrapper"; allows for reload via "SIGUSR2")
13+
# -db -- disables background mode
14+
set -- haproxy -W -db "$@"
15+
fi
16+
17+
exec "$@"

3.2/haproxy.cfg

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
#---------------------------------------------------------------------
2+
# Example configuration for a possible web application. See the
3+
# full configuration options online.
4+
#
5+
# https://www.haproxy.org/download/3.2/doc/configuration.txt
6+
# https://cbonte.github.io/haproxy-dconv/3.2/configuration.html
7+
#
8+
#---------------------------------------------------------------------
9+
10+
#---------------------------------------------------------------------
11+
# Global settings
12+
#---------------------------------------------------------------------
13+
global
14+
# to have these messages end up in /var/log/haproxy.log you will
15+
# need to:
16+
#
17+
# 1) configure syslog to accept network log events. This is done
18+
# by adding the '-r' option to the SYSLOGD_OPTIONS in
19+
# /etc/sysconfig/syslog
20+
#
21+
# 2) configure local2 events to go to the /var/log/haproxy.log
22+
# file. A line like the following can be added to
23+
# /etc/sysconfig/syslog
24+
#
25+
# local2.* /var/log/haproxy.log
26+
#
27+
log 127.0.0.1 local2
28+
29+
chroot /var/lib/haproxy
30+
pidfile /var/run/haproxy.pid
31+
maxconn 4000
32+
user haproxy
33+
group haproxy
34+
# daemon
35+
36+
# turn on stats unix socket
37+
stats socket /var/lib/haproxy/stats
38+
39+
#---------------------------------------------------------------------
40+
# common defaults that all the 'listen' and 'backend' sections will
41+
# use if not designated in their block
42+
#---------------------------------------------------------------------
43+
defaults
44+
mode http
45+
log global
46+
option httplog
47+
option dontlognull
48+
option http-server-close
49+
option forwardfor except 127.0.0.0/8
50+
option redispatch
51+
retries 3
52+
timeout http-request 10s
53+
timeout queue 1m
54+
timeout connect 10s
55+
timeout client 1m
56+
timeout server 1m
57+
timeout http-keep-alive 10s
58+
timeout check 10s
59+
maxconn 3000
60+
61+
#---------------------------------------------------------------------
62+
# example how to define user and enable Data Plane API on tcp/5555
63+
# more information: https://github.com/haproxytech/dataplaneapi and
64+
# https://www.haproxy.com/documentation/hapee/2-0r1/configuration/dataplaneapi/
65+
#---------------------------------------------------------------------
66+
# userlist haproxy-dataplaneapi
67+
# user admin insecure-password mypassword
68+
#
69+
# program api
70+
# command /usr/bin/dataplaneapi --host 0.0.0.0 --port 5555 --haproxy-bin /usr/sbin/haproxy --config-file /etc/haproxy/haproxy.cfg --reload-cmd "kill -SIGUSR2 1" --restart-cmd "kill -SIGUSR2 1" --reload-delay 5 --userlist haproxy-dataplaneapi
71+
# no option start-on-reload
72+
73+
#---------------------------------------------------------------------
74+
# main frontend which proxys to the backends
75+
#---------------------------------------------------------------------
76+
frontend main
77+
bind *:80
78+
# bind *:443 ssl # To be completed ....
79+
80+
acl url_static path_beg -i /static /images /javascript /stylesheets
81+
acl url_static path_end -i .jpg .gif .png .css .js
82+
83+
use_backend static if url_static
84+
default_backend app
85+
86+
#---------------------------------------------------------------------
87+
# static backend for serving up images, stylesheets and such
88+
#---------------------------------------------------------------------
89+
backend static
90+
balance roundrobin
91+
server static1 127.0.0.1:4331 check
92+
server static2 127.0.0.1:4332 check
93+
94+
#---------------------------------------------------------------------
95+
# round robin balancing between the various backends
96+
#---------------------------------------------------------------------
97+
backend app
98+
balance roundrobin
99+
server app1 127.0.0.1:5001 check
100+
server app2 127.0.0.1:5002 check
101+
server app3 127.0.0.1:5003 check
102+
server app4 127.0.0.1:5004 check

build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
DOCKER_TAG="haproxytech/haproxy-debian"
44
HAPROXY_GITHUB_URL="https://github.com/haproxytech/haproxy-docker-debian/blob/main"
5-
HAPROXY_BRANCHES="2.2 2.4 2.6 2.8 2.9 3.0 3.1"
6-
HAPROXY_CURRENT_BRANCH="3.0"
5+
HAPROXY_BRANCHES="2.2 2.4 2.6 2.8 2.9 3.0 3.1 3.2"
6+
HAPROXY_CURRENT_BRANCH="3.1"
77
PUSH="no"
88
HAPROXY_UPDATED=""
99

0 commit comments

Comments
 (0)