FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install build and runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
autoconf automake libtool pkg-config make gcc g++ \
python3-dev python3-setuptools python3 \
libpopt0 libpopt-dev ca-certificates curl git \
&& rm -rf /var/lib/apt/lists/*
# Build from source
WORKDIR /src
COPY . /src
# Ensure scripts have execute permissions
RUN chmod +x autogen.sh
RUN ./autogen.sh && \
./configure && \
make -j"$(nproc)" && \
make install
# Quick smoke test to verify the built binary is installed
RUN if command -v distcc >/dev/null 2>&1; then distcc --help || true; fi
# Default to showing help of distcc when container starts
CMD ["distcc", "--help"]