From 50b37d4a27d3295a29afca2286f1a5a086142cec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 11:49:46 +0200 Subject: Adding upstream version 3.2.1+dfsg. Signed-off-by: Daniel Baumann --- scripts/docker/ubuntu16/Dockerfile | 59 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 scripts/docker/ubuntu16/Dockerfile (limited to 'scripts/docker/ubuntu16/Dockerfile') diff --git a/scripts/docker/ubuntu16/Dockerfile b/scripts/docker/ubuntu16/Dockerfile new file mode 100644 index 0000000..c9a81c7 --- /dev/null +++ b/scripts/docker/ubuntu16/Dockerfile @@ -0,0 +1,59 @@ +ARG from=ubuntu:16.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 +WORKDIR /usr/local/src/repositories + +# +# Shallow clone the FreeRADIUS source +# +ARG source=https://github.com/FreeRADIUS/freeradius-server.git +ARG release=v3.2.x + +RUN git clone --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 + +# +# Clean environment and run the server +# +FROM ${from} +COPY --from=build /usr/local/src/repositories/*.deb /tmp/ + +RUN apt-get update \ + && apt-get install -y /tmp/*.deb \ + && apt-get clean \ + && rm -r /var/lib/apt/lists/* /tmp/*.deb \ + \ + && ln -s /etc/freeradius /etc/raddb + +COPY docker-entrypoint.sh / +RUN chmod +x /docker-entrypoint.sh + +EXPOSE 1812/udp 1813/udp +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["freeradius"] -- cgit v1.2.3