]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add Debian 9 docker file
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 10 Sep 2017 06:21:19 +0000 (13:21 +0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 10 Sep 2017 06:21:33 +0000 (13:21 +0700)
Clean up other docker files

We still need to fix apt packaging for libkqueue, as it doesn't seem to be available on debian.

cmake does produce packages for libraries/binaries but no -dev (headers).

scripts/docker/build-centos6/Dockerfile
scripts/docker/build-centos7/Dockerfile
scripts/docker/build-debian7/Dockerfile
scripts/docker/build-debian8/Dockerfile [moved from scripts/docker/build-debian/Dockerfile with 82% similarity]
scripts/docker/build-debian9/Dockerfile [new file with mode: 0644]
scripts/docker/centos7/Dockerfile [deleted file]

index 23ada12a719c383cd9f095f02b2a7f8ae5e59aa8..14fed4d9829bc707d8440d474b1cf89d64eeaa16 100644 (file)
@@ -58,6 +58,9 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project'\
 > /etc/yum.repos.d/ltb-project.repo
 RUN rpm --import https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project
 
+#
+#  Build hiredis packages manually as the version available is too old
+#
 WORKDIR /usr/local/src/repositories
 RUN git clone --depth=1 https://github.com/mattrose/hiredis.git
 WORKDIR hiredis
@@ -90,7 +93,10 @@ RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin
 # Create the build tree
 ENV BUILDDIR=/root/rpmbuild
 RUN rpmdev-setuptree
-### This is necessary for the jenkins server to talk to the docker instance
+
+#
+#  This is necessary for the jenkins server to talk to the docker instance
+#
 RUN yum install -y openssh-server java-1.8.0-openjdk-headless createrepo
 RUN adduser jenkins
 RUN printf jenkins1 | passwd --stdin jenkins
index 7af22fe3db2028a404a2d25313f6f2c8a80346bd..ebddb6c431da1ed3031a9de13e0c937fb1d194a9 100644 (file)
@@ -76,7 +76,10 @@ RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin
 # Create the build tree
 ENV BUILDDIR=/root/rpmbuild
 RUN rpmdev-setuptree
-### This is necessary for the jenkins server to talk to the docker instance
+
+#
+#  This is necessary for the jenkins server to talk to the docker instance
+#
 RUN yum install -y openssh-server java-1.8.0-openjdk-headless createrepo
 RUN adduser jenkins
 RUN printf jenkins1 | passwd --stdin jenkins
index 9066f306dd07fb454f0173b7fa5af294f0796fe2..745c9b7d052e4b3ab6de8df7f9109b2e6939d871 100644 (file)
@@ -1,17 +1,27 @@
 FROM debian:wheezy
 RUN apt-get update && apt-get install -y sudo firebird-dev freetds-dev libcap-dev libcollectdclient-dev libcurl4-openssl-dev libgdbm-dev libhiredis-dev libidn11-dev libiodbc2-dev libjson0-dev libldap2-dev libpq-dev libmemcached-dev libmysqlclient-dev libpam0g-dev libpcap-dev libperl-dev libsqlite3-dev libunbound-dev libtalloc-dev libwbclient-dev libykclient-dev libyubikey-dev python-dev ruby ruby-dev snmp software-properties-common python-software-properties libssl-dev libtalloc-dev libkqueue-dev make packaging-dev libkrb5-dev libreadline-dev samba4-dev openssh-server mercurial
 
+#
+#  Install GCC-4.9 as it has the requisite support for C11 keywords and atomics
+#
+RUN echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list
+RUN apt-get update && apt-get install -y gcc-4.9 g++-4.9
+RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 && update-alternatives --config gcc
+
+#
+#  This is necessary for the jenkins server to talk to the docker instance
+#
+ENV DISABLE_HOTSPOT_OS_VERSION_CHECK=ok
+
 RUN hg clone http://hg.openjdk.java.net/jdk8/jdk8 YourOpenJDK ;\
     cd YourOpenJDK ;\
     bash ./get_source.sh
 RUN apt-get install -y cpio zip openjdk-7-jdk libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev cups libcups2-dev
 RUN apt-get install -y libfreetype6-dev libasound2-dev 
-ENV DISABLE_HOTSPOT_OS_VERSION_CHECK=ok
+
 RUN cd YourOpenJDK && bash ./configure && make 
 RUN cd YourOpenJDK && make install
-RUN echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list
-RUN apt-get update && apt-get install -y gcc-4.9 g++-4.9
-#RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 && update-alternatives --config gcc
+
 RUN apt-get install -y sudo && echo "jenkins ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers
 RUN useradd -m jenkins
 RUN echo "jenkins:jenkins1" | chpasswd
similarity index 82%
rename from scripts/docker/build-debian/Dockerfile
rename to scripts/docker/build-debian8/Dockerfile
index 2b8b743a20c46277662ad045ff11301108a67eef..65e2bef0a17a4b49b76e63d1dbfb1cfb882d5fc1 100644 (file)
@@ -1,10 +1,17 @@
 FROM debian:jessie
 RUN apt-get update && apt-get install -y devscripts equivs git quilt
+
+#
+#  Install GCC-4.9 as it has the requisite support for C11 keywords and atomics
+#
 RUN apt-get install -y g++-4.9
 RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 && update-alternatives --config gcc
-WORKDIR /usr/local/src/repositories
-RUN git clone --depth=1 https://github.com/mattrose/freeradius-server.git
 
+#
+#  Setup a src dir in /usr/local
+#
+WORKDIR /usr/local/src/repositories
+RUN git clone --depth=1 https://github.com/FreeRADIUS/freeradius-server.git
 WORKDIR freeradius-server
 
 # Install build dependencies for all branches
@@ -16,15 +23,21 @@ RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin
 
 ### For some reason this dep was not installed
 # RUN apt-get install -y libiodbc2-dev
-### This is necessary for the jenkins server to talk to the docker instance
+
+#
+#  This is necessary for the jenkins server to talk to the docker instance
+#
 RUN echo deb http://ftp.debian.org/debian jessie-backports main >> /etc/apt/sources.list
 RUN apt-get update && apt-get -t jessie-backports install -y openjdk-8-jre-headless 
 RUN apt-get install -y openssh-server sudo 
+
 RUN useradd -m jenkins
 RUN echo "jenkins:jenkins1" | chpasswd
 RUN echo "jenkins ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers
+
 RUN mkdir /var/run/sshd
 # RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
 RUN sed -i 's|session    required     pam_loginuid.so|session    optional     pam_loginuid.so|g' /etc/pam.d/sshd
+
 EXPOSE 22
 CMD ["/usr/sbin/sshd","-D"]
diff --git a/scripts/docker/build-debian9/Dockerfile b/scripts/docker/build-debian9/Dockerfile
new file mode 100644 (file)
index 0000000..4d56885
--- /dev/null
@@ -0,0 +1,64 @@
+FROM debian:stretch
+RUN apt-get update && apt-get install -y devscripts equivs git quilt
+
+#
+#  Stretch uses gcc4.9 by default, so we don't need to install any additional compilers to get C11 functionality
+#
+
+#
+#  Setup a src dir in /usr/local
+#
+RUN mkdir -p /usr/local/src/repositories
+WORKDIR /usr/local/src
+
+#
+#  Get a modern version of cmake.  We need 3.8.2 or later to build libkqueue rpms
+#
+RUN curl -f -o cmake.sh https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
+RUN [ "$(cat cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
+RUN sh cmake.sh --skip-license --prefix=/usr/local
+
+#
+#  Grab libkqueue and build
+#
+WORKDIR /usr/local/src/repositories
+# Fixme: Change to the main repo when they merge this branch
+RUN git clone --branch patch-3 --depth=1 https://github.com/arr2036/libkqueue.git
+WORKDIR libkqueue
+RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
+    make && \
+    cpack -G DEB
+RUN apt-get install -y ./*.deb
+
+#
+#  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}
+WORKDIR freeradius-server
+
+# Install build dependencies for all branches
+RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^v[0-9]*\.[0-9x]*\.x$");\
+       do \
+               git checkout $i; \
+               [ -e ./debian/control.in ] && debian/rules debian/control && echo 'y' | mk-build-deps -irt'apt-get -yV' debian/control; \
+       done
+
+#
+#  This is necessary for the jenkins server to talk to the docker instance
+#
+RUN echo deb http://ftp.debian.org/debian stretch-backports main >> /etc/apt/sources.list
+RUN apt-get update && apt-get -t stretch-backports install -y openjdk-8-jre-headless 
+RUN apt-get install -y openssh-server sudo 
+
+RUN useradd -m jenkins
+RUN echo "jenkins:jenkins1" | chpasswd
+RUN echo "jenkins ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers
+RUN mkdir /var/run/sshd
+
+# RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
+RUN sed -i 's|session    required     pam_loginuid.so|session    optional     pam_loginuid.so|g' /etc/pam.d/sshd
+
+EXPOSE 22
+CMD ["/usr/sbin/sshd","-D"]
diff --git a/scripts/docker/centos7/Dockerfile b/scripts/docker/centos7/Dockerfile
deleted file mode 100644 (file)
index d2c23fa..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-FROM centos:centos7
-
-#
-#  Install devtools like Make and git
-#
-RUN yum groupinstall -y "Development Tools"
-RUN yum install -y rpmdevtools
-RUN yum install -y vim emacs nano
-
-#
-#  Add the EPEL repository for freetds and hiredis
-#
-RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
-
-#
-#  Install GCC-4.9 as it has the requisite support for C11 keywords and atomics
-#
-RUN yum install -y centos-release-scl
-RUN yum install -y devtoolset-3-gcc devtoolset-3-gcc-c++
-ENV CC=/opt/rh/devtoolset-3/root/usr/bin/gcc
-
-#
-#  Setup a src dir in /usr/local
-#
-RUN mkdir -p /usr/local/src/repositories
-WORKDIR /usr/local/src
-
-#
-#  Get a modern version of cmake.  We need 3.8.2 or later to build libkqueue rpms
-#
-RUN yum install -y openssl
-
-RUN curl https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh > ./cmake.sh
-
-RUN [ "$(cat ./cmake.sh | openssl sha256 | sed 's/^.* //')" = "bb26b1871f9e5c2fb73476186cc94d03b674608f704b48b94d617340b87b4d73" ]
-RUN chmod +x ./cmake.sh
-RUN ./cmake.sh --skip-license --prefix=/usr/local
-
-#
-#  Grab libkqueue and build
-#
-WORKDIR /usr/local/src/repositories
-RUN git clone --depth=1 --no-single-branch https://github.com/arr2036/libkqueue.git
-WORKDIR libkqueue
-
-#
-#  Use LTB's openldap packages intead of the distribution version to avoid linking against NSS
-#
-RUN echo $'[ltb-project]\n\
-name=LTB project packages\n\
-baseurl=https://ltb-project.org/rpm/$releasever/$basearch\n\
-enabled=1\n\
-gpgcheck=1\n\
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-LTB-project'\
-> /etc/yum.repos.d/ltb-project.repo
-RUN rpm --import https://ltb-project.org/lib/RPM-GPG-KEY-LTB-project
-
-
-# Fixme: Change to the main repo when they merge this branch
-RUN git checkout patch-3
-RUN cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ./ && \
-    make && \
-    cpack -G RPM
-RUN yum localinstall -y ./*.rpm
-
-#
-#  Shallow clone the FreeRADIUS source
-#
-WORKDIR /usr/local/src/repositories
-RUN git clone --depth 1 --no-single-branch https://github.com/FreeRADIUS/freeradius-server.git
-WORKDIR freeradius-server
-
-# Install build dependencies for all branches
-RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^v[0-9]*\.[0-9x]*\.x$");\
-       do \
-               git checkout $i; \
-               [ -e ./redhat/freeradius.spec ] && yum-builddep -y ./redhat/freeradius.spec; \
-       done
-
-# Create the build tree
-ENV BUILDDIR=/root/rpmbuild
-RUN rpmdev-setuptree