Skip to content

Instantly share code, notes, and snippets.

@yuasatakayuki
Created June 30, 2017 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuasatakayuki/3f9b18c93abf1ce278c96475ca860500 to your computer and use it in GitHub Desktop.
Save yuasatakayuki/3f9b18c93abf1ce278c96475ca860500 to your computer and use it in GitHub Desktop.
Example Dockerfile that builds RubyFits on Scientific Linux 6
FROM cern/slc6-base
# Instll prerequisites - yum
RUN yum install -y wget zlib zlib-devel bzip2 bzip2-devel readline-devel git cmake tar gzip
RUN yum groupinstall -y "Development Tools"
RUN wget https://gist.githubusercontent.com/mustafaturan/8290150/raw/a85c6194f36d7b08b7b97bdf676fa5f945815b70/ruby.2.4.0-setup.sh; \
bash ruby.2.4.0-setup.sh
RUN wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/Openwsman/CentOS_CentOS-6/x86_64/swig-3.0.2-5.1.x86_64.rpm; \
rpm -Uvh swig-3.0.2-5.1.x86_64.rpm
# Install sllib and sfitsio
RUN wget http://www.ir.isas.jaxa.jp/~cyamauch/sli/sllib-1.4.5.tar.gz; \
tar zxf sllib-1.4.5.tar.gz; \
cd sllib-1.4.5; \
./configure --prefix=/usr; \
make -j4; \
make install; \
cd ..; \
rm -r sllib-1.4.5
RUN wget http://www.ir.isas.jaxa.jp/~cyamauch/sli/sfitsio-1.4.5.tar.gz; \
tar zxf sfitsio-1.4.5.tar.gz; \
cd sfitsio-1.4.5; \
./configure --prefix=/usr; \
make -j4; \
make install; \
cd ..; \
rm -r sfitsio-1.4.5
# Install RubyFits
WORKDIR /root
RUN git clone https://github.com/yuasatakayuki/RubyFits.git; \
cd RubyFits; \
mkdir build; \
cd build; \
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/; \
make -j4; \
make install;
# Add RUBYLIB
WORKDIR /root
RUN echo "export RUBYLIB=/usr/local/lib/ruby" >> .bashrc
ENTRYPOINT ["bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment