Skip to content

Commit 2634db3

Browse files
committed
Add 3.2 branch
1 parent c5796ae commit 2634db3

File tree

11 files changed

+240
-17
lines changed

11 files changed

+240
-17
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/arm64
1515
DOCKER_IMAGE: haproxytech/haproxy-ubuntu-quic
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.6", "2.8", "2.9", "3.0", "3.1"]
12+
branch: ["2.6", "2.8", "2.9", "3.0", "3.1", "3.2"]
1313
env:
1414
DOCKER_PLATFORMS: linux/amd64,linux/arm64
1515
DOCKER_IMAGE: haproxytech/haproxy-ubuntu-quic
16-
STABLE_BRANCH: "3.0"
16+
STABLE_BRANCH: "3.1"
1717
steps:
1818
- name: Login to Docker Hub
1919
id: login_docker

2.6/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM ubuntu:jammy AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
ENV DEBIAN_FRONTEND noninteractive
2121

2.8/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM ubuntu:jammy AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
ENV DEBIAN_FRONTEND noninteractive
2121

2.9/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM ubuntu:jammy AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
ENV DEBIAN_FRONTEND noninteractive
2121

3.0/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM ubuntu:jammy AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
ENV DEBIAN_FRONTEND noninteractive
2121

3.1/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine3.20 AS dataplaneapi-builder
1+
FROM golang:alpine AS dataplaneapi-builder
22

33
ENV DATAPLANE_MINOR 3.0.3
44
ENV DATAPLANE_V2_MINOR 2.9.8
@@ -15,7 +15,7 @@ RUN apk add --no-cache ca-certificates git make && \
1515

1616
FROM ubuntu:jammy AS openssl-builder
1717

18-
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
1919

2020
ENV DEBIAN_FRONTEND noninteractive
2121

@@ -42,7 +42,7 @@ LABEL Version 3.1.0
4242
LABEL RUN /usr/bin/docker -d IMAGE
4343

4444
ENV HAPROXY_BRANCH 3.1
45-
ENV HAPROXY_MINOR 3.1.0
45+
ENV HAPROXY_MINOR 3.1.0-old
4646
ENV HAPROXY_SHA256 56a1468574ab411dcabde837f96bea6cf3c2eb90e279469f75ed1dcdc70fce11
4747
ENV HAPROXY_SRC_URL http://www.haproxy.org/download
4848

@@ -58,7 +58,7 @@ COPY --from=openssl-builder /opt/quictls /opt/quictls
5858
RUN apt-get update && \
5959
apt-get install -y --no-install-recommends procps zlib1g "libpcre2-*" liblua5.4-0 libatomic1 tar curl socat ca-certificates && \
6060
apt-get install -y --no-install-recommends gcc make libc6-dev libpcre3-dev zlib1g-dev liblua5.4-dev && \
61-
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/devel/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
61+
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
6262
echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c - && \
6363
groupadd "$HAPROXY_GID" && \
6464
useradd -g "$HAPROXY_GID" "$HAPROXY_UID" && \

3.2/Dockerfile

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
FROM golang:alpine AS dataplaneapi-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 ubuntu:jammy AS openssl-builder
17+
18+
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.3.0-quic1.tar.gz
19+
20+
ENV DEBIAN_FRONTEND noninteractive
21+
22+
RUN apt-get update && \
23+
apt-get install -y --no-install-recommends build-essential ca-certificates curl && \
24+
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
25+
mkdir -p /tmp/openssl && \
26+
tar -xzf openssl.tar.gz -C /tmp/openssl --strip-components=1 && \
27+
rm -f openssl.tar.gz && \
28+
cd /tmp/openssl && \
29+
./config --libdir=lib --prefix=/opt/quictls && \
30+
make -j $(nproc) && \
31+
make install && \
32+
rm -rf /tmp/openssl
33+
34+
FROM ubuntu:jammy
35+
36+
MAINTAINER Dinko Korunic <[email protected]>
37+
38+
LABEL Name HAProxy
39+
LABEL Release Community Edition
40+
LABEL Vendor HAProxy
41+
LABEL Version 3.2.0
42+
LABEL RUN /usr/bin/docker -d IMAGE
43+
44+
ENV HAPROXY_BRANCH 3.2
45+
ENV HAPROXY_MINOR 3.2.0-old
46+
ENV HAPROXY_SHA256 56a1468574ab411dcabde837f96bea6cf3c2eb90e279469f75ed1dcdc70fce11
47+
ENV HAPROXY_SRC_URL http://www.haproxy.org/download
48+
49+
ENV HAPROXY_UID haproxy
50+
ENV HAPROXY_GID haproxy
51+
52+
ENV DEBIAN_FRONTEND noninteractive
53+
54+
COPY --from=dataplaneapi-builder /dataplaneapi /usr/local/bin/dataplaneapi
55+
COPY --from=dataplaneapi-builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
56+
COPY --from=openssl-builder /opt/quictls /opt/quictls
57+
58+
RUN apt-get update && \
59+
apt-get install -y --no-install-recommends procps zlib1g "libpcre2-*" liblua5.4-0 libatomic1 tar curl socat ca-certificates && \
60+
apt-get install -y --no-install-recommends gcc make libc6-dev libpcre3-dev zlib1g-dev liblua5.4-dev && \
61+
curl -sfSL "${HAPROXY_SRC_URL}/${HAPROXY_BRANCH}/src/devel/haproxy-${HAPROXY_MINOR}.tar.gz" -o haproxy.tar.gz && \
62+
echo "$HAPROXY_SHA256 *haproxy.tar.gz" | sha256sum -c - && \
63+
groupadd "$HAPROXY_GID" && \
64+
useradd -g "$HAPROXY_GID" "$HAPROXY_UID" && \
65+
mkdir -p /tmp/haproxy && \
66+
tar -xzf haproxy.tar.gz -C /tmp/haproxy --strip-components=1 && \
67+
rm -f haproxy.tar.gz && \
68+
make -C /tmp/haproxy -j"$(nproc)" TARGET=linux-glibc CPU=generic USE_PCRE2=1 USE_PCRE2_JIT=1 \
69+
USE_TFO=1 USE_LINUX_TPROXY=1 USE_LUA=1 USE_GETADDRINFO=1 \
70+
USE_PROMEX=1 USE_SLZ=1 \
71+
USE_OPENSSL=1 USE_PTHREAD_EMULATION=1 \
72+
SSL_INC=/opt/quictls/include SSL_LIB=/opt/quictls/lib USE_QUIC=1 \
73+
LDFLAGS="-L/opt/quictls/lib -Wl,-rpath,/opt/quictls/lib" \
74+
all && \
75+
make -C /tmp/haproxy TARGET=linux-glibc install-bin install-man && \
76+
ln -s /usr/local/sbin/haproxy /usr/sbin/haproxy && \
77+
mkdir -p /var/lib/haproxy && \
78+
chown "$HAPROXY_UID:$HAPROXY_GID" /var/lib/haproxy && \
79+
mkdir -p /usr/local/etc/haproxy && \
80+
ln -s /usr/local/etc/haproxy /etc/haproxy && \
81+
cp -R /tmp/haproxy/examples/errorfiles /usr/local/etc/haproxy/errors && \
82+
rm -rf /tmp/haproxy && \
83+
apt-get purge -y --auto-remove gcc make libc6-dev libpcre2-dev zlib1g-dev liblua5.4-dev && \
84+
apt-get clean && \
85+
rm -rf /var/lib/apt/lists/* && \
86+
chmod +x /usr/local/bin/dataplaneapi && \
87+
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
88+
chmod +x /usr/local/bin/dataplaneapi-v2 && \
89+
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
90+
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
91+
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml && \
92+
echo "/opt/quictls/lib" > /etc/ld.so.conf.d/quictls.conf && \
93+
mkdir -p /opt/quictls/ssl && \
94+
rm -rf /opt/quictls/ssl/certs && \
95+
ln -s /etc/ssl/certs /opt/quictls/ssl/certs && \
96+
ldconfig
97+
98+
COPY haproxy.cfg /usr/local/etc/haproxy
99+
COPY docker-entrypoint.sh /
100+
101+
STOPSIGNAL SIGUSR1
102+
103+
ENTRYPOINT ["/docker-entrypoint.sh"]
104+
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 /usr/local/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-ubuntu-quic"
44
HAPROXY_GITHUB_URL="https://github.com/haproxytech/haproxy-docker-ubuntu-quic/blob/main"
5-
HAPROXY_BRANCHES="2.6 2.8 2.9 3.0 3.1"
6-
HAPROXY_CURRENT_BRANCH="3.0"
5+
HAPROXY_BRANCHES="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)