aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2018-08-29 14:51:35 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2018-08-29 14:51:35 -0400
commit7239121fdad2f33083bbd670a1b6871f88730c49 (patch)
tree5f077c5be07e79cae22930de9a3c6ed04aa42e4c
downloaddocker-buildsys-pipeline-7239121fdad2f33083bbd670a1b6871f88730c49.tar.gz
Initial commit
-rw-r--r--Dockerfile87
-rw-r--r--LICENSE29
2 files changed, 116 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..4871b87
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,87 @@
+FROM centos:6.9
+
+# Declare build-time environment
+
+# Miniconda
+ARG MC_VERSION=4.5.4
+ARG MC_PLATFORM=Linux
+ARG MC_ARCH=x86_64
+ARG MC_URL=https://repo.continuum.io/miniconda
+
+# Conda root
+ARG CONDA_VERSION=4.5.10
+ARG CONDA_BUILD_VERSION
+ARG CONDA_PACKAGES
+
+# Declare environment
+ENV OPT=/opt \
+ HOME=/home/developer
+
+ENV PYTHONUNBUFFERED=1 \
+ MC_VERSION=${MC_VERSION} \
+ MC_PLATFORM=${MC_PLATFORM} \
+ MC_ARCH=${MC_ARCH} \
+ MC_URL=${MC_URL} \
+ MC_INSTALLER=Miniconda3-${MC_VERSION}-${MC_PLATFORM}-${MC_ARCH}.sh \
+ MC_PATH=${OPT}/conda \
+ CONDA_VERSION=${CONDA_VERSION} \
+ CONDA_BUILD_VERSION=${CONDA_BUILD_VERSION} \
+ CONDA_PACKAGES=${CONDA_PACKAGES}
+
+# Toolchain
+RUN yum update -y && yum install -y \
+ bzip2-devel \
+ curl \
+ gcc \
+ gcc-c++ \
+ gcc-gfortran \
+ git \
+ glibc-devel.i686 \
+ glibc-devel \
+ kernel-devel \
+ libX11-devel \
+ mesa-libGL \
+ mesa-libGLU \
+ ncurses-devel \
+ subversion \
+ sudo \
+ wget \
+ zlib-devel \
+ && yum clean all
+
+# Create 'developer' user
+# Configure sudoers
+RUN groupadd developer \
+ && useradd -g developer -m -d $HOME -s /bin/bash developer \
+ && echo "developer:developer" | chpasswd \
+ && echo "developer ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+
+# Install Miniconda
+# Reset permissions
+RUN curl -q -O ${MC_URL}/${MC_INSTALLER} \
+ && bash ${MC_INSTALLER} -b -p ${MC_PATH} \
+ && rm -rf ${MC_INSTALLER} \
+ && echo export PATH="${MC_PATH}/bin:\${PATH}" > /etc/profile.d/conda.sh \
+ && chown -R developer: ${OPT} ${HOME}
+
+# Pipeline definition
+ARG PIPELINE_URL
+
+# Configure Conda
+ENV PATH "${MC_PATH}/bin:${PATH}"
+USER developer
+
+RUN conda config --set auto_update_conda false \
+ && conda config --set always_yes true \
+ && conda config --set quiet true \
+ && conda config --set rollback_enabled false \
+ && conda install --yes --quiet \
+ conda=${CONDA_VERSION} \
+ conda-build=${CONDA_BUILD_VERSION} \
+ git \
+ ${CONDA_PACKAGES} \
+ && conda install --file "${PIPELINE_URL}"
+
+WORKDIR ${HOME}
+
+CMD ["/bin/bash"]
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..c84d182
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2017, AstroConda
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.