Skip to content

Commit

Permalink
Use freeRADIUS packages and not the sources
Browse files Browse the repository at this point in the history
  • Loading branch information
fdurand committed Mar 7, 2025
1 parent 6b0f77c commit b016b4d
Showing 1 changed file with 2 additions and 57 deletions.
59 changes: 2 additions & 57 deletions containers/radiusd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,65 +1,11 @@
ARG from=debian:bookworm
ARG KNK_REGISTRY_URL
ARG IMAGE_TAG

FROM ${from} as build

ARG DEBIAN_FRONTEND=noninteractive

#
# Install build tools
#
RUN apt-get -qq update
RUN apt-get -qq install -y devscripts equivs git quilt gcc libcollectdclient-dev

#
# Create build directory
#
RUN mkdir -p /usr/local/src/repositories
WORKDIR /usr/local/src/repositories

#
# Shallow clone the FreeRADIUS source
#
ARG source=https://github.com/inverse-inc/freeradius-server.git
ARG release=feature/PacketFence_3.2.7

RUN git clone -qq --depth 1 --single-branch --branch ${release} ${source}
WORKDIR freeradius-server

#
# Install build dependencies
#
RUN git checkout ${release}; \
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
#
# RUN make -j2 deb >/dev/null || make -j2 deb
RUN make -j2 deb

#
# Clean environment and run the server
#
FROM ${KNK_REGISTRY_URL}/pfdebian:${IMAGE_TAG}

# Copy debian packages
COPY --from=build /usr/local/src/repositories/*.deb /tmp/

RUN apt-get -qq -y remove freeradius-common


RUN apt-get -qq update \
&& apt-get clean \
&& apt-get -qq install -y /tmp/*.deb \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/* /tmp/*.deb \
\
&& ln -s /etc/freeradius /etc/raddb
&& apt-get -qq install -y freeradius=4:3.2.7+git freeradius-common=4:3.2.7+git freeradius-config=4:3.2.7+git freeradius-ldap=4:3.2.7+git freeradius-mysql=4:3.2.7+git freeradius-redis=4:3.2.7+git freeradius-rest=4:3.2.7+git freeradius-utils=4:3.2.7+git \
&& apt-get clean

WORKDIR /usr/local/pf/

Expand Down Expand Up @@ -96,4 +42,3 @@ RUN chown -R pf: /usr/local/pf/logs && \
chmod 664 -R /usr/local/pf/logs

RUN sed -i 's#^socket\s*=.*#socket=/var/lib/mysql/mysql.sock#' /etc/mysql/my.cnf

0 comments on commit b016b4d

Please sign in to comment.