From 6258e7dcf30f61d1c8a5a1ada36a0173a9c0d464 Mon Sep 17 00:00:00 2001 From: Derry Hamilton Date: Wed, 12 Jun 2019 13:01:25 +0100 Subject: [PATCH] Seperate build docker and run docker --- build_util/build_in_docker | 2 +- docker/build/Dockerfile | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 docker/build/Dockerfile diff --git a/build_util/build_in_docker b/build_util/build_in_docker index 72d8b76..caa6996 100755 --- a/build_util/build_in_docker +++ b/build_util/build_in_docker @@ -1,6 +1,6 @@ #!/bin/bash set -e -docker build --rm -t local/c7-buildhost docker +docker build --rm -t local/c7-buildhost docker/build docker run -it -v `pwd`:/root/build local/c7-buildhost /root/build/build_util/build_rpm diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile new file mode 100644 index 0000000..207828b --- /dev/null +++ b/docker/build/Dockerfile @@ -0,0 +1,31 @@ +# General build RPM environment for CentOS 6.x +# +# VERSION 0.0.1 + +FROM centos:centos7 +MAINTAINER Derry Hamilton + +# Install up-to-date epel rpm repository +RUN yum -y install epel-release + +# Install java first, to get a sensible one. +RUN yum -y install java-1.8.0-openjdk-devel + +# Install various packages to get compile environment +RUN yum -y groupinstall 'Development Tools' + +# Install git command to access GitHub repository +RUN yum -y install git + +# Install rpm-build to use rpmrebuild command +RUN yum -y install rpm-build + +# Install yum-utils to use yumdownloader command +RUN yum -y install yum-utils + +# Install rpmdevtools to use rpmdev-setuptree command +RUN yum -y install rpmdevtools + +# Install rpmdevtools to use rpmdev-setuptree command +RUN yum -y install maven +RUN mkdir -p /root/rpmbuild/SOURCES