From cdc4b09dee390e8c7ab7e138fd131b5738600090 Mon Sep 17 00:00:00 2001 From: JeGoi <13801368+JeGoi@users.noreply.github.com> Date: Wed, 2 Aug 2023 03:57:59 -0400 Subject: [PATCH] Change packaging order, add debian, add readme file --- .../packaging/deb11/FreeRadius/Dockerfile | 42 +++++++++++++++++++ .../packaging/deb11/FreeRadius/README.md | 4 ++ .../el8 => el8/FreeRadius}/Dokerfile | 0 containers/packaging/el8/FreeRadius/README.md | 4 ++ 4 files changed, 50 insertions(+) create mode 100644 containers/packaging/deb11/FreeRadius/Dockerfile create mode 100644 containers/packaging/deb11/FreeRadius/README.md rename containers/packaging/{FreeRadius/el8 => el8/FreeRadius}/Dokerfile (100%) create mode 100644 containers/packaging/el8/FreeRadius/README.md diff --git a/containers/packaging/deb11/FreeRadius/Dockerfile b/containers/packaging/deb11/FreeRadius/Dockerfile new file mode 100644 index 000000000000..cc53095443de --- /dev/null +++ b/containers/packaging/deb11/FreeRadius/Dockerfile @@ -0,0 +1,42 @@ +ARG from=debian:bullseye +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 +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 diff --git a/containers/packaging/deb11/FreeRadius/README.md b/containers/packaging/deb11/FreeRadius/README.md new file mode 100644 index 000000000000..39f4d86edf82 --- /dev/null +++ b/containers/packaging/deb11/FreeRadius/README.md @@ -0,0 +1,4 @@ +## How to use: +Build the image +Run/Jump the container +scp all .deb file from the container /tmp diff --git a/containers/packaging/FreeRadius/el8/Dokerfile b/containers/packaging/el8/FreeRadius/Dokerfile similarity index 100% rename from containers/packaging/FreeRadius/el8/Dokerfile rename to containers/packaging/el8/FreeRadius/Dokerfile diff --git a/containers/packaging/el8/FreeRadius/README.md b/containers/packaging/el8/FreeRadius/README.md new file mode 100644 index 000000000000..6cc05e02a343 --- /dev/null +++ b/containers/packaging/el8/FreeRadius/README.md @@ -0,0 +1,4 @@ +## How to use: +Build the image +Run/Jump the container +scp all .rpm file from the container /tmp