Created
August 25, 2016 19:52
-
-
Save brianv0/568fb0528b6f7782c73a1b86bd7925c4 to your computer and use it in GitHub Desktop.
Stack Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER Brian Van Klaveren <[email protected]> | |
ENV INSTALL_MINICONDA N | |
ENV LSST_STACK_DIR /lsst/stack | |
ENV LSST_USER qserv | |
ENV LSST_GROUP qserv | |
ENV LSST_WORKSPACE /qserv | |
ENV LSST_PRODUCT qserv_distrib | |
ENV LSST_TAG_OPT -t qserv_latest | |
# Handle prerequisites | |
RUN apt-get -y update && apt-get -y upgrade | |
RUN apt-get --yes install bash \ | |
bison \ | |
bzip2 \ | |
cmake \ | |
curl \ | |
flex \ | |
g++ \ | |
gettext \ | |
git \ | |
libbz2-dev \ | |
libglib2.0-dev \ | |
libpthread-workqueue-dev \ | |
libreadline-dev \ | |
libssl-dev \ | |
make \ | |
python-numpy \ | |
ncurses-dev \ | |
openjdk-8-jre-headless \ | |
openssl \ | |
patch \ | |
python-dev \ | |
python-setuptools \ | |
zlib1g-dev | |
RUN apt-get -y clean | |
# Add user and groups | |
RUN groupadd $LSST_GROUP | |
RUN useradd -m -g $LSST_USER $LSST_GROUP | |
RUN usermod -s /bin/bash $LSST_USER | |
# Make sure $LSST_STACK_DIR and $LSST_WORKSPACE have proper permissions | |
RUN mkdir -p $LSST_STACK_DIR && chown $LSST_USER:$LSST_GROUP $LSST_STACK_DIR | |
RUN mkdir -p $LSST_WORKSPACE && chown $LSST_USER:$LSST_GROUP $LSST_WORKSPACE | |
# Install the stack as $LSST_USER | |
USER $LSST_USER | |
WORKDIR $LSST_STACK_DIR | |
# Use newinstall | |
RUN curl -OL https://raw.githubusercontent.com/lsst/lsst/master/scripts/newinstall.sh | |
RUN echo $INSTALL_MINICONDA | /bin/bash newinstall.sh | |
# Install your product | |
RUN /bin/bash -c 'source $LSST_STACK_DIR/loadLSST.bash; eups distrib install $LSST_PRODUCT $LSST_TAG_OPT' | |
# Switch to workspace, which is independant from the stack install | |
WORKDIR $LSST_WORKSPACE | |
# Do something more interesting here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment