a7112079f5
Build and Push Docker Image to Gitea Container Registry / build-and-push (push) Failing after 2m53s
43 lines
1.1 KiB
Docker
43 lines
1.1 KiB
Docker
###############################################
|
|
# Stage 1 — Build FreeRADIUS with PostgreSQL
|
|
###############################################
|
|
FROM debian:stable AS builder
|
|
|
|
# Install build dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y \
|
|
git \
|
|
build-essential \
|
|
libpq-dev \
|
|
pkg-config \
|
|
autoconf \
|
|
automake \
|
|
libtool \
|
|
libssl-dev && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Build FreeRADIUS from source
|
|
WORKDIR /build
|
|
RUN git clone --depth 1 https://github.com/FreeRADIUS/freeradius-server.git
|
|
|
|
WORKDIR /build/freeradius-server
|
|
|
|
RUN ./configure --with-rlm-sql-postgresql && \
|
|
make && \
|
|
make install
|
|
|
|
|
|
###############################################
|
|
# Stage 2 — Runtime image
|
|
###############################################
|
|
FROM freeradius/freeradius-server:latest
|
|
|
|
# Copy compiled modules and configs from builder
|
|
COPY --from=builder /usr/local/lib/freeradius /usr/lib/freeradius
|
|
COPY --from=builder /usr/local/etc/raddb /etc/freeradius
|
|
|
|
# Optional: ensure SQL module is enabled
|
|
RUN ln -s /etc/freeradius/mods-available/sql /etc/freeradius/mods-enabled/sql
|
|
|
|
# FreeRADIUS runs automatically via base image entrypoint
|