Skip to content

Commit

Permalink
Remove 2.0 branch. Bring back dataplaneapi v2 as /usr/local/bin/datap…
Browse files Browse the repository at this point in the history
…laneapi-v2. Update quictls to 3.1.7-quic1.
  • Loading branch information
dkorunic committed Sep 11, 2024
1 parent 924bcdc commit d3b1a98
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 30 deletions.
15 changes: 9 additions & 6 deletions 2.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM golang:alpine3.20 AS dataplaneapi-builder

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_V2_MINOR 2.9.6
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi.git

RUN apk add --no-cache ca-certificates git make && \
git clone "${DATAPLANE_URL}" "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
cd "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
git checkout "v${DATAPLANE_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi
make build && cp build/dataplaneapi /dataplaneapi && \
make clean && \
git checkout "v${DATAPLANE_V2_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi-v2

FROM alpine:3.20 AS openssl-builder

ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.5-quic1.tar.gz
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz

RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
Expand Down Expand Up @@ -39,14 +43,11 @@ ENV HAPROXY_MINOR 2.6.18
ENV HAPROXY_SHA256 1b36d3c618360eff7cdc2b70dd53affdf9c939d0fdf8602ac2d77018535f709a
ENV HAPROXY_SRC_URL http://www.haproxy.org/download

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_SHA256 ec685350576898bb0a00d656f427f5da7c28043551a3e0050c1b5301547e235a
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi/releases/download

ENV HAPROXY_UID haproxy
ENV HAPROXY_GID haproxy

COPY --from=dataplaneapi-builder /dataplaneapi /usr/local/bin/dataplaneapi
COPY --from=dataplaneapi-builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
COPY --from=openssl-builder /opt/quictls /opt/quictls

RUN apk add --no-cache ca-certificates && \
Expand Down Expand Up @@ -78,6 +79,8 @@ RUN apk add --no-cache ca-certificates && \
rm -rf /tmp/haproxy && \
chmod +x /usr/local/bin/dataplaneapi && \
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
chmod +x /usr/local/bin/dataplaneapi-v2 && \
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml && \
apk del build-deps && \
Expand Down
15 changes: 9 additions & 6 deletions 2.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM golang:alpine3.20 AS dataplaneapi-builder

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_V2_MINOR 2.9.6
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi.git

RUN apk add --no-cache ca-certificates git make && \
git clone "${DATAPLANE_URL}" "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
cd "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
git checkout "v${DATAPLANE_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi
make build && cp build/dataplaneapi /dataplaneapi && \
make clean && \
git checkout "v${DATAPLANE_V2_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi-v2

FROM alpine:3.20 AS openssl-builder

ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.5-quic1.tar.gz
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz

RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
Expand Down Expand Up @@ -39,14 +43,11 @@ ENV HAPROXY_MINOR 2.8.10
ENV HAPROXY_SHA256 0d63cd46d9d10ac7dbc02f3c6769c1908f221e0a5c5b655a194655f7528d612a
ENV HAPROXY_SRC_URL http://www.haproxy.org/download

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_SHA256 ec685350576898bb0a00d656f427f5da7c28043551a3e0050c1b5301547e235a
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi/releases/download

ENV HAPROXY_UID haproxy
ENV HAPROXY_GID haproxy

COPY --from=dataplaneapi-builder /dataplaneapi /usr/local/bin/dataplaneapi
COPY --from=dataplaneapi-builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
COPY --from=openssl-builder /opt/quictls /opt/quictls

RUN apk add --no-cache ca-certificates && \
Expand Down Expand Up @@ -78,6 +79,8 @@ RUN apk add --no-cache ca-certificates && \
rm -rf /tmp/haproxy && \
chmod +x /usr/local/bin/dataplaneapi && \
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
chmod +x /usr/local/bin/dataplaneapi-v2 && \
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml && \
apk del build-deps && \
Expand Down
15 changes: 9 additions & 6 deletions 2.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM golang:alpine3.20 AS dataplaneapi-builder

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_V2_MINOR 2.9.6
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi.git

RUN apk add --no-cache ca-certificates git make && \
git clone "${DATAPLANE_URL}" "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
cd "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
git checkout "v${DATAPLANE_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi
make build && cp build/dataplaneapi /dataplaneapi && \
make clean && \
git checkout "v${DATAPLANE_V2_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi-v2

FROM alpine:3.20 AS openssl-builder

ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.5-quic1.tar.gz
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz

RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
Expand Down Expand Up @@ -39,14 +43,11 @@ ENV HAPROXY_MINOR 2.9.10
ENV HAPROXY_SHA256 c561b75e1031135dc773c7bbaeeef6e53d24a2accd27a0ebce5883cdb12640c0
ENV HAPROXY_SRC_URL http://www.haproxy.org/download

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_SHA256 ec685350576898bb0a00d656f427f5da7c28043551a3e0050c1b5301547e235a
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi/releases/download

ENV HAPROXY_UID haproxy
ENV HAPROXY_GID haproxy

COPY --from=dataplaneapi-builder /dataplaneapi /usr/local/bin/dataplaneapi
COPY --from=dataplaneapi-builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
COPY --from=openssl-builder /opt/quictls /opt/quictls

RUN apk add --no-cache ca-certificates && \
Expand Down Expand Up @@ -78,6 +79,8 @@ RUN apk add --no-cache ca-certificates && \
rm -rf /tmp/haproxy && \
chmod +x /usr/local/bin/dataplaneapi && \
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
chmod +x /usr/local/bin/dataplaneapi-v2 && \
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml && \
apk del build-deps && \
Expand Down
15 changes: 9 additions & 6 deletions 3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM golang:alpine3.20 AS dataplaneapi-builder

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_V2_MINOR 2.9.6
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi.git

RUN apk add --no-cache ca-certificates git make && \
git clone "${DATAPLANE_URL}" "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
cd "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
git checkout "v${DATAPLANE_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi
make build && cp build/dataplaneapi /dataplaneapi && \
make clean && \
git checkout "v${DATAPLANE_V2_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi-v2

FROM alpine:3.20 AS openssl-builder

ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.5-quic1.tar.gz
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz

RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
Expand Down Expand Up @@ -39,14 +43,11 @@ ENV HAPROXY_MINOR 3.0.4
ENV HAPROXY_SHA256 aabfd98ada721bbfb68f7805586ced0373fb4c8d73e18faa94055a16c2096936
ENV HAPROXY_SRC_URL http://www.haproxy.org/download

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_SHA256 ec685350576898bb0a00d656f427f5da7c28043551a3e0050c1b5301547e235a
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi/releases/download

ENV HAPROXY_UID haproxy
ENV HAPROXY_GID haproxy

COPY --from=dataplaneapi-builder /dataplaneapi /usr/local/bin/dataplaneapi
COPY --from=dataplaneapi-builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
COPY --from=openssl-builder /opt/quictls /opt/quictls

RUN apk add --no-cache ca-certificates && \
Expand Down Expand Up @@ -78,6 +79,8 @@ RUN apk add --no-cache ca-certificates && \
rm -rf /tmp/haproxy && \
chmod +x /usr/local/bin/dataplaneapi && \
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
chmod +x /usr/local/bin/dataplaneapi-v2 && \
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml && \
apk del build-deps && \
Expand Down
15 changes: 9 additions & 6 deletions 3.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM golang:alpine3.20 AS dataplaneapi-builder

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_V2_MINOR 2.9.6
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi.git

RUN apk add --no-cache ca-certificates git make && \
git clone "${DATAPLANE_URL}" "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
cd "${GOPATH}/src/github.com/haproxytech/dataplaneapi" && \
git checkout "v${DATAPLANE_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi
make build && cp build/dataplaneapi /dataplaneapi && \
make clean && \
git checkout "v${DATAPLANE_V2_MINOR}" && \
make build && cp build/dataplaneapi /dataplaneapi-v2

FROM alpine:3.20 AS openssl-builder

ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.5-quic1.tar.gz
ENV OPENSSL_URL https://github.com/quictls/openssl/archive/refs/tags/openssl-3.1.7-quic1.tar.gz

RUN apk add --no-cache curl build-base make autoconf automake gcc libc-dev linux-headers && \
curl -sfSL "${OPENSSL_URL}" -o openssl.tar.gz && \
Expand Down Expand Up @@ -39,14 +43,11 @@ ENV HAPROXY_MINOR 3.1-dev7
ENV HAPROXY_SHA256 d6112b8b3f6041632c02ef89bd585184a4a1115d251a767fb18c01082bb0a4a0
ENV HAPROXY_SRC_URL http://www.haproxy.org/download

ENV DATAPLANE_MINOR 3.0.0
ENV DATAPLANE_SHA256 ec685350576898bb0a00d656f427f5da7c28043551a3e0050c1b5301547e235a
ENV DATAPLANE_URL https://github.com/haproxytech/dataplaneapi/releases/download

ENV HAPROXY_UID haproxy
ENV HAPROXY_GID haproxy

COPY --from=dataplaneapi-builder /dataplaneapi /usr/local/bin/dataplaneapi
COPY --from=dataplaneapi-builder /dataplaneapi-v2 /usr/local/bin/dataplaneapi-v2
COPY --from=openssl-builder /opt/quictls /opt/quictls

RUN apk add --no-cache ca-certificates && \
Expand Down Expand Up @@ -78,6 +79,8 @@ RUN apk add --no-cache ca-certificates && \
rm -rf /tmp/haproxy && \
chmod +x /usr/local/bin/dataplaneapi && \
ln -s /usr/local/bin/dataplaneapi /usr/bin/dataplaneapi && \
chmod +x /usr/local/bin/dataplaneapi-v2 && \
ln -s /usr/local/bin/dataplaneapi-v2 /usr/bin/dataplaneapi-v2 && \
touch /usr/local/etc/haproxy/dataplaneapi.yml && \
chown "$HAPROXY_UID:$HAPROXY_GID" /usr/local/etc/haproxy/dataplaneapi.yml && \
apk del build-deps && \
Expand Down
9 changes: 9 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ if [ -z "${DATAPLANE_MINOR}" ]; then
exit 1
fi

DATAPLANE_SRC_URL="https://api.github.com/repos/haproxytech/dataplaneapi/releases"
DATAPLANE_V2_MINOR=$(curl -sfSL "$DATAPLANE_SRC_URL" | \
grep '"tag_name":.*"v2' | \
sed -E 's/.*"v?([^"]+)".*/\1/' | \
sort -V | \
tail -1
)

OPENSSL_SRC_URL="https://api.github.com/repos/quictls/openssl/releases"
OPENSSL_MINOR=$(curl -sfSL "$OPENSSL_SRC_URL" | \
grep '"tag_name":' | \
Expand All @@ -74,5 +82,6 @@ sed -r -i -e "s!^(ENV HAPROXY_SRC_URL) .*!\1 ${HAPROXY_SRC_URL}!;
s!^(LABEL Version) .*!\1 ${HAPROXY_MINOR}!;
s!^(ENV HAPROXY_SHA256) .*!\1 ${HAPROXY_SHA256}!
s!^(ENV DATAPLANE_MINOR) .*!\1 ${DATAPLANE_MINOR}!
s!^(ENV DATAPLANE_V2_MINOR) .*!\1 ${DATAPLANE_V2_MINOR}!
s!^(ENV OPENSSL_MINOR) .*!\1 ${OPENSSL_MINOR}!" \
"$DOCKERFILE"

0 comments on commit d3b1a98

Please sign in to comment.