Skip to content

Commit

Permalink
Some tidying up of the centos7 Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnewton committed Feb 4, 2019
1 parent 7194c6b commit b43611c
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions scripts/docker/build-centos7/Dockerfile.deps
@@ -1,17 +1,11 @@
FROM centos:centos7

#
# Install devtools like Make and git
# Install devtools like make and git and the EPEL
# repository for freetds and hiredis
#
RUN yum groupinstall -y "Development Tools"
RUN yum install -y rpmdevtools
RUN yum install -y vim emacs nano
RUN yum install -y openssl

#
# Add the EPEL repository for freetds and hiredis
#
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum update -y
RUN yum install -y rpmdevtools openssl epel-release git

#
# Install GCC-4.9 as it has the requisite support for C11 keywords and atomics
Expand Down Expand Up @@ -57,19 +51,18 @@ 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

WORKDIR /usr/local/src/repositories

#
# 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
# Install build dependencies for all branches from v3 onwards
#
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$");\
WORKDIR freeradius-server
RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin 2>/dev/null | sed -e 's#origin/##' | egrep "^v[3-9]*\.[0-9x]*\.x$");\
do \
git checkout $i; \
[ -e redhat/freeradius.spec ] && yum-builddep -y redhat/freeradius.spec; \
Expand All @@ -80,4 +73,3 @@ RUN for i in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin
#
ENV BUILDDIR=/root/rpmbuild
RUN rpmdev-setuptree

0 comments on commit b43611c

Please sign in to comment.