| 1 |
FROM centos:7 |
| 2 |
|
| 3 |
# Install generic dependencies to build jss |
| 4 |
RUN true \ |
| 5 |
&& yum update -y \ |
| 6 |
&& yum install -y epel-release yum-utils \ |
| 7 |
&& yum install -y gcc make cmake3 \ |
| 8 |
&& yum-builddep -y jss \ |
| 9 |
&& mkdir -p /home/sandbox \ |
| 10 |
&& yum clean -y all \ |
| 11 |
&& rm -rf /usr/share/doc /usr/share/doc-base \ |
| 12 |
/usr/share/man /usr/share/locale /usr/share/zoneinfo \ |
| 13 |
&& true |
| 14 |
|
| 15 |
# Link in the current version of jss from the git repository |
| 16 |
WORKDIR /home/sandbox |
| 17 |
COPY . /home/sandbox/jss |
| 18 |
|
| 19 |
# Install dependencies from the spec file in case they've changed |
| 20 |
# since the last release on this platform. |
| 21 |
RUN true \ |
| 22 |
&& yum-builddep -y /home/sandbox/jss/jss.spec \ |
| 23 |
&& true |
| 24 |
|
| 25 |
# Perform the actual build from source, not from RPM |
| 26 |
WORKDIR /home/sandbox/jss |
| 27 |
CMD true \ |
| 28 |
&& rm -rf build \ |
| 29 |
&& mkdir build \ |
| 30 |
&& cd build \ |
| 31 |
&& cmake3 .. \ |
| 32 |
&& make all \ |
| 33 |
&& ctest --output-on-failure \ |
| 34 |
&& true |