# Built for Libevent - build from source using CMake on Ubuntu Jammy
FROM ubuntu:jammy-20260210.1
# Install required build tools and libraries
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
cmake \
pkg-config \
libmbedtls-dev \
libssl-dev \
zlib1g-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Set working directory to the repository root inside the image
WORKDIR /libevent
# Copy the entire repository into the image
COPY . .
# Build the project from source
RUN mkdir -p build \
&& cmake -S . -B build \
&& cmake --build build
# Default to an interactive shell for inspection
CMD ["/bin/bash"]
# Docker build ignore .git .gitignore build/ dist/ cmake-build-* CMakeFiles/ CMakeCache.txt Makefile makefile *.tar.gz *.tar.bz2 *.log *.pyc *.pyo *.swp *.swo *.o *.so *.dll *.dSYM pytest_cache/ *.coverage coverage/ .DS_Store node_modules/
# Docker build ignore .git .gitignore build/ dist/ cmake-build-* CMakeFiles/ CMakeCache.txt Makefile makefile *.tar.gz *.tar.bz2 *.log *.pyc *.pyo *.swp *.swo *.o *.so *.dll *.dSYM pytest_cache/ *.coverage coverage/ .DS_Store node_modules/
Smoke [PASS]: test -d /libevent/build && ( [ -f /libevent/build/Makefile ] || [ -f /libevent/build/build.ninja ] ) Smoke [PASS]: test -f /libevent/build/CMakeCache.txt