+++ /dev/null
-# Auto generated for ubuntu18
-# from scripts/crossbuild/m4/Dockerfile.deb.m4
-#
-# Rebuild this file with `make crossbuild.ubuntu18.regen`
-#
-ARG from=ubuntu:18.04
-FROM ${from} as build
-
-ARG DEBIAN_FRONTEND=noninteractive
-
-#
-# Install add-apt-repository
-#
-RUN apt-get update && \
- apt-get install -y software-properties-common gnupg2 procps && \
- apt-get clean && \
- rm -r /var/lib/apt/lists/*
-
-
-RUN apt-get update && \
-# Development utilities
- apt-get install -y devscripts equivs git quilt rsync && \
-# Compilers
- apt-get install -y g++ llvm clang lldb && \
-# eapol_test dependencies
- apt-get install -y libnl-3-dev libnl-genl-3-dev
-
-#
-# Documentation build dependecies
-#
-
-# - doxygen & JSON.pm
-RUN apt-get install -y doxygen graphviz libjson-perl
-# - antora (npm needed)
-RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
-RUN apt-get install -y nodejs
-RUN npm i -g @antora/cli@3.1.7 @antora/site-generator-default@3.1.7
-# - pandoc
-WORKDIR /tmp
-RUN curl -OL $(curl -s https://api.github.com/repos/jgm/pandoc/releases/latest | grep "browser_download_url.*deb" | cut -d '"' -f 4)
-RUN apt-get install -y ./pandoc-*.deb
-# - asciidoctor
-RUN apt-get install -y ruby-dev
-RUN gem install asciidoctor
-
-
-
-#
-# Setup a src dir in /usr/local
-#
-RUN mkdir -p /usr/local/src/repositories
-WORKDIR /usr/local/src/repositories
-
-
-#
-# Shallow clone the FreeRADIUS source
-#
-WORKDIR /usr/local/src/repositories
-ARG source=https://github.com/FreeRADIUS/freeradius-server.git
-RUN git clone --depth 1 --no-single-branch ${source}
-
-#
-# Install build dependencies for all branches from v3 onwards
-#
-WORKDIR freeradius-server
-RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^(v[3-9]*\.[0-9x]*\.x|master)$");\
- do \
- git checkout $i; \
- if [ -e ./debian/control.in ] ; then \
- debian/rules debian/control ; \
- fi ; \
- echo 'y' | \
- mk-build-deps -irt'apt-get -yV' debian/control ; \
- done
+++ /dev/null
-# Auto generated for ubuntu18
-# from scripts/docker/m4/Dockerfile.deb.m4
-#
-# Rebuild this file with `make docker.ubuntu18.regen`
-#
-ARG from=ubuntu:18.04
-FROM ${from} AS build
-
-ARG DEBIAN_FRONTEND=noninteractive
-
-#
-# Install build tools
-#
-RUN apt-get update
-RUN apt-get install -y devscripts equivs git quilt gcc
-
-#
-# Create build directory
-#
-RUN mkdir -p /usr/local/src/repositories/freeradius-server
-WORKDIR /usr/local/src/repositories/freeradius-server/
-
-#
-# Copy the FreeRADIUS directory in
-#
-COPY . .
-
-#
-# Clean up tree - we want to build from the latest commit, not from
-# any cruft left around on the local system
-#
-RUN git clean -fdxx \
- && git reset --hard HEAD
-
-ARG release
-RUN [ -z "$release" ] || git checkout ${release} ; \
- git status ; \
- git log -1 --oneline
-
-#
-# Install build dependencies
-#
-RUN if [ -e ./debian/control.in ]; then \
- debian/rules debian/control; \
- fi; \
- echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control
-
-#
-# Build the server
-#
-# Work around fakeroot problems in Docker when building for different
-# platforms - doesn't matter as we run as root in the container anyway.
-#
-#RUN make -j$(nproc) deb
-RUN debian/rules debian/control \
- && dpkg-buildpackage --jobs=auto -b -uc
-
-#
-# Clean environment and run the server
-#
-FROM ${from}
-ARG DEBIAN_FRONTEND=noninteractive
-
-COPY --from=build /usr/local/src/repositories/*.deb /tmp/
-
-RUN ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
-
-RUN apt-get update \
- && apt-get install -y tzdata \
- && apt-get install -y /tmp/*.deb \
- && apt-get clean \
- && rm -r /var/lib/apt/lists/* /tmp/*.deb \
- \
- && ln -s /etc/freeradius /etc/raddb
-
-WORKDIR /
-COPY scripts/docker/etc/docker-entrypoint.sh.deb docker-entrypoint.sh
-RUN chmod +x docker-entrypoint.sh
-
-EXPOSE 1812/udp 1813/udp
-ENTRYPOINT ["/docker-entrypoint.sh"]
-CMD ["freeradius"]
+++ /dev/null
-#!/bin/sh
-set -e
-
-# this if will check if the first argument is a flag
-# but only works if all arguments require a hyphenated flag
-# -v; -SL; -f arg; etc will work, but not arg1 arg2
-if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
- set -- freeradius "$@"
-fi
-
-# check for the expected command
-if [ "$1" = 'freeradius' ]; then
- shift
- exec freeradius -f "$@"
-fi
-
-# many people are likely to call "radiusd" as well, so allow that
-if [ "$1" = 'radiusd' ]; then
- shift
- exec freeradius -f "$@"
-fi
-
-# else default to run whatever the user wanted like "bash" or "sh"
-exec "$@"
ifelse(ifelse(
D_NAME, `debian10', no,
- D_NAME, `ubuntu18', no,
D_NAME, `ubuntu20', no,
yes), yes, `dnl
ARG freerad_uid=101
D_NAME, [debian11], [p_SET([deb], [debian], [11], [bullseye], [debian:bullseye])],
D_NAME, [debian12], [p_SET([deb], [debian], [12], [bookworm], [debian:bookworm])],
D_NAME, [debiansid], [p_SET([deb], [debian], [99], [sid], [debian:sid])],
- D_NAME, [ubuntu18], [p_SET([deb], [ubuntu], [18], [bionic], [ubuntu:18.04])],
D_NAME, [ubuntu20], [p_SET([deb], [ubuntu], [20], [focal], [ubuntu:20.04])],
D_NAME, [ubuntu22], [p_SET([deb], [ubuntu], [22], [jammy], [ubuntu:22.04])],
D_NAME, [ubuntu24], [p_SET([deb], [ubuntu], [24], [noble], [ubuntu:24.04])],