]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add Rocky 10 to Docker builds
authorNick Porter <nick@portercomputing.co.uk>
Thu, 19 Jun 2025 09:32:19 +0000 (10:32 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 19 Jun 2025 09:32:19 +0000 (10:32 +0100)
scripts/docker/build/rocky10/Dockerfile [new file with mode: 0644]
scripts/docker/m4/Dockerfile.m4

diff --git a/scripts/docker/build/rocky10/Dockerfile b/scripts/docker/build/rocky10/Dockerfile
new file mode 100644 (file)
index 0000000..21d1d4d
--- /dev/null
@@ -0,0 +1,131 @@
+# Auto generated for rocky10
+# from scripts/docker/m4/docker.rpm.m4
+#
+# Rebuild this file with `make docker.rocky10.regen`
+#
+ARG from=rockylinux/rockylinux:10
+FROM ${from} as build
+
+
+
+#
+#  Install build tools
+#
+RUN dnf groupinstall -y "Development Tools"
+
+RUN dnf install -y rpmdevtools openssl dnf-utils
+
+
+#
+#  Set up NetworkRADIUS extras repository
+#
+RUN echo $'[networkradius-extras]\n\
+name=NetworkRADIUS-extras-$releasever\n\
+baseurl=http://packages.networkradius.com/extras/rocky/$releasever/\n\
+enabled=1\n\
+gpgcheck=1\n\
+gpgkey=https://packages.networkradius.com/pgp/packages@networkradius.com'\
+> /etc/yum.repos.d/networkradius-extras.repo
+RUN rpm --import https://packages.networkradius.com/pgp/packages@networkradius.com
+
+#
+#  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
+
+#
+#  Other requirements
+#
+
+#  Enable EPEL repository for freetds and hiredis
+RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
+
+#
+#  Install build dependencies
+#
+#  Run twice, it doesn't always get everything with one invocation
+RUN [ -e redhat/freeradius.spec ] && \
+       dnf builddep -y redhat/freeradius.spec && \
+       dnf builddep -y redhat/freeradius.spec
+
+#
+#  Create RPM build environment
+#
+ENV BUILDDIR=/root/rpmbuild
+RUN rpmdev-setuptree
+
+RUN ./configure
+RUN make pkg_version > /VERSION
+RUN cat /VERSION
+RUN make freeradius-server-$(cat /VERSION).tar.bz2
+RUN cp freeradius-server-$(cat /VERSION).tar.bz2 $BUILDDIR/SOURCES/
+RUN cp -r redhat/* $BUILDDIR/SOURCES/
+RUN make dist-check-rpm
+RUN cp -r redhat/freeradius.spec $BUILDDIR/SPECS/
+WORKDIR $BUILDDIR
+
+#
+#  Build the server
+#
+ENV QA_RPATHS=0x0003
+RUN rpmbuild -bb --define "_release $(cat /VERSION)" "$BUILDDIR/SPECS/freeradius.spec"
+
+RUN mkdir /root/rpms
+RUN mv $BUILDDIR/RPMS/*/*.rpm /root/rpms/
+
+#
+#  Clean environment and run the server
+#
+FROM ${from}
+
+COPY --from=build /root/rpms /tmp/
+
+#
+#  Set up NetworkRADIUS extras repository
+#
+RUN echo $'[networkradius-extras]\n\
+name=NetworkRADIUS-extras-$releasever\n\
+baseurl=http://packages.networkradius.com/extras/rocky/$releasever/\n\
+enabled=1\n\
+gpgcheck=1\n\
+gpgkey=https://packages.networkradius.com/pgp/packages@networkradius.com'\
+> /etc/yum.repos.d/networkradius-extras.repo
+RUN rpm --import https://packages.networkradius.com/pgp/packages@networkradius.com
+
+#
+#  Other requirements
+#
+
+
+#  EPEL repository for freetds and hiredis
+RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm \
+    && dnf install -y dnf-utils \
+    && dnf config-manager --enable epel-testing
+
+ARG radiusd_uid=95
+ARG radiusd_gid=95
+
+RUN groupadd -g ${radiusd_gid} -r radiusd \
+    && useradd -u ${radiusd_uid} -g radiusd -r -M -d /home/radiusd -s /sbin/nologin radiusd \
+    && dnf install -y /tmp/*.rpm
+
+WORKDIR /
+COPY scripts/docker/etc/docker-entrypoint.sh.rpm docker-entrypoint.sh
+RUN chmod +x docker-entrypoint.sh
+
+EXPOSE 1812/udp 1813/udp
+ENTRYPOINT ["/docker-entrypoint.sh"]
+CMD ["radiusd"]
index 74966f8b1bce3e8f5b5ae18c37f921bd2f42645e..fe9c4ec6c51dbb0f991a49a3010a037ab6298071 100644 (file)
@@ -33,6 +33,7 @@ ifelse(
        D_NAME, [centos8],      [p_SET([rpm], [centos], [8],    [8],            [centos:8])],
        D_NAME, [rocky8],       [p_SET([rpm], [rocky],  [8],    [8],            [rockylinux/rockylinux:8])],
        D_NAME, [rocky9],       [p_SET([rpm], [rocky],  [9],    [9],            [rockylinux/rockylinux:9])],
+       D_NAME, [rocky10],      [p_SET([rpm], [rocky],  [10],   [10],           [rockylinux/rockylinux:10])],
        [errprint(error: OS 'D_NAME' not defined[,] see __file__
 )m4exit(1)]
 )