Used for CSPP trim on Mac laptop. Typically want to use trim-cspp branch.
Assumes source is in $HOME/Repos/git/ShellB3
, substitute as warranted.
Phase 0: clone to repo on host
cd $HOME/Repos/git
git clone https://gitlab.ssec.wisc.edu/rayg/ShellB3.git --branch trim-cspp --single-branch ShellB3
Phase 1: base dev image setup
docker run -it --rm -v $HOME/dock:/dock -v $HOME/Repos/git:/source -w /work centos:6 /bin/bash
yum -y install gcc-gfortran gcc-c++ unzip perl patch byacc bison flex glibc-devel.i686 glibc-devel.x86_64 xz git
mkdir /work
chmod 777 /work
adduser -u 1000 user
Phase 1A: Use committed dev image as centos6sb3dev:latest :
docker run -it --rm -v $HOME/dock:/dock -v $HOME/Repos/git:/source -w /work centos6sb3dev:latest /bin/bash
Phase 2: Softlink source into dev container
su - user
mkdir -p /work/ShellB3
cp -rs /source/ShellB3/* /work/ShellB3/
ln -s /source/ShellB3/.git /work/ShellB3/
Phase 3: do the build
export MAKEFLAGS=-j4
cd /work/ShellB3/ShellB3
bash shallbethree.sh mk_cspp |tee /dock/sb3.log 2>&1
Phase 3A : alternate build for py27
cd /work/ShellB3/ShellB3
export MAKEFLAGS=-j4
PYTHON_VERSION=2 bash shallbethree.sh mk_cspp |tee /dock/sb3.log 2>&1
Phase 4: make binary distribution and push it back to dock
bash shallbethree.sh bin_dist
exit
cd ShellB3
cp *.tar.xz /dock/
sha256sum *.tar.xz >>/dock/SHA256SUM