Commit d1687973 authored by Chuck Atkins's avatar Chuck Atkins
Browse files

Add the source to build a CentOS 6 container for building ParaView

parent 7865e107
FROM centos:6
MAINTAINER Chuck Atkins <>
# Install some extra core system utilities and editors
RUN yum install -y \
file tar xz bzip2 \
wget screen vim-enhanced vim-filesystem emacs
# Install development tools and X libraries
RUN yum install -y \
gcc gcc-c++ gcc-gfortran \
git subversion libtool automake scons \
libX11-devel libXdamage-devel libXext-devel libXt-devel libXi-devel \
libxcb-devel xorg-x11-xtrans-devel libXcursor-devel libXft-devel \
libXinerama-devel libXrandr-devel libXrender-devel \
mesa-libGL-devel mesa-libOSMesa-devel mesa-libGLU-devel
# Install some additional convienient utilities from the EPEL repo
RUN yum install -y epel-release && \
yum install -y htop pbzip2
# Install a newer set of compilers from the Software Collections repos
RUN yum install -y centos-release-scl && \
yum install -y \
devtoolset-3-gcc devtoolset-3-gcc-c++ devtoolset-3-gcc-gfortran python27
# Cleanup
RUN yum clean all
# Install the most recent CMake release
RUN mkdir -p /tmp/cmake && \
git clone -b release git:// /tmp/cmake/source && \
mkdir -p /tmp/cmake/build && cd /tmp/cmake/build && \
/tmp/cmake/source/bootstrap --parallel=8 && make -j8 install && \
cd / && rm -rf /tmp/cmake
# Create the shared mount point
RUN mkdir -p /mnt/shared
docker build --rm -t paraview-el6-build .
# Make sure the shared mount point exists
BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE}))
mkdir -p ${BASE_DIR}/shared
chmod 6755 ${BASE_DIR}/shared
# The first 3 sets of arguments lets the container use the X server on the host
# The next mounts a shared directory between the container and host
# Next, the add-host argument just makes accessing the host more convenient
X=$(echo ${DISPLAY} | sed 's|.*:\([0-9]*\)\.[0-9]*|\1|')
IP=$(ip addr show docker0 | sed -n 's|.*inet \([0-9\.]*\).*|\1|p')
docker run -i \
--env="DISPLAY" \
--volume="/tmp/.X11-unix/X${X}:/tmp/.X11-unix/X${X}:rw" \
--volume="${HOME}/.Xauthority:/root/.Xauthority:rw" \
--volume="${BASE_DIR}/shared:/mnt/shared:rw" \
--add-host="${HOSTNAME}:${IP}" --hostname=paraview-el6-build \
-t paraview-el6-build \
/bin/bash --login
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment