Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions haproxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2020 The Hut Group
# Copyright 2023 The Hut Group
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand All @@ -25,15 +25,15 @@ WORKDIR /build

RUN yum update -y && \
yum install -y make gcc perl pcre-devel zlib-devel wget perl-Test-Harness perl-Module-Load-Conditional perl-core make gcc gcc-c++ pcre-devel readline-devel systemd-devel zlib-devel
RUN wget https://www.openssl.org/source/openssl-1.1.1n.tar.gz && \
tar zxf openssl-1.1.1n.tar.gz
RUN wget https://www.openssl.org/source/openssl-3.0.8.tar.gz && \
tar zxf openssl-3.0.8.tar.gz
RUN wget https://www.lua.org/ftp/lua-5.4.4.tar.gz && \
tar zxf lua-5.4.4.tar.gz
RUN wget http://www.haproxy.org/download/2.4/src/haproxy-2.4.15.tar.gz && \
tar zxf haproxy-2.4.15.tar.gz
RUN wget http://www.haproxy.org/download/2.7/src/haproxy-2.7.3.tar.gz && \
tar zxf haproxy-2.7.3.tar.gz


WORKDIR /build/openssl-1.1.1n
WORKDIR /build/openssl-3.0.8
RUN ./config --prefix=/usr/local/ssl --libdir=lib no-shared zlib && \
make && \
make test && \
Expand All @@ -43,8 +43,8 @@ WORKDIR /build/lua-5.4.4
RUN make linux test && \
make linux install

WORKDIR /build/haproxy-2.4.15
WORKDIR /build/haproxy-2.7.3
RUN make TARGET=linux-glibc USE_PTHREAD_PSHARED=1 USE_OPENSSL=1 USE_PCRE=1 USE_SYSTEMD=1 USE_LIBCRYPT=1 USE_GETADDRINFO=1 USE_TFO=1 USE_NS=1 USE_ZLIB=1 USE_LUA=1 USE_PROMEX=1 SSL_LIB=/usr/local/ssl/lib SSL_INC=/usr/local/ssl/include LUA_LIB=/usr/local/lib/ LUA_INC=/usr/local/include/

FROM scratch AS export-stage
COPY --from=build-stage /build/haproxy-2.4.15/haproxy /
COPY --from=build-stage /build/haproxy-2.7.3/haproxy /
7 changes: 7 additions & 0 deletions haproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@
This container will build HAProxy from source along with OpenSSL and Lua

## Execution
If you're using podman, you need to ssh into your podman machine using
```podman machine ssh```
and navigate into this directory from there before running the next step.

If you've mounted the Users directory to your podman machine then you'll probably have to run something like
```cd /Users/[your machine username]/[path to this directory]```

Build the container which will compile, build and output the haproxy executable:
`docker build -o . .`