FROM ubuntu:jammy-20260210.1
# Build OpenVPN from source using autotools
ENV DEBIAN_FRONTEND=noninteractive
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
build-essential autoconf automake libtool pkg-config \
libssl-dev liblzo2-dev libpam0g-dev liblz4-dev libcap-ng-dev libnl-genl-3-dev linux-libc-dev libcmocka-dev python3-docutils iproute2 \
; rm -rf /var/lib/apt/lists/*
WORKDIR /openvpn
COPY . .
RUN autoreconf -fvi
RUN ./configure --with-crypto-library=openssl --enable-werror
# Build but skip running the test suite to ensure a reliable container image
RUN make -j4
RUN make install
# Default to printing the OpenVPN version to verify the build in smoke tests
CMD ["openvpn","--version"]