Commit 24020f75 authored by Alexandre Beelen's avatar Alexandre Beelen

Attempt to speed up build process

parent 5a91e5f5
FROM debian:stretch as builder
ARG release
ENV release=${release}
FROM debian:stretch as worker
RUN apt-get -y update && apt-get install -y \
libx11-6 \
libpng16-16 \
libfftw3-3 \
libcfitsio5 \
libforms2 \
python \
python-numpy \
libgtk2.0
FROM worker as _builder
RUN apt-get -y update && apt-get install -y \
libx11-dev \
libpng-dev \
......@@ -8,10 +17,14 @@ RUN apt-get -y update && apt-get install -y \
libcfitsio-dev \
libforms-dev \
python-dev \
python-numpy \
libgtk2.0-dev \
gfortran \
curl
FROM _builder as builder
ARG release
ENV release=${release}
RUN curl http://www.iram.fr/~gildas/dist/gildas-src-$release.tar.xz | tar xJ && \
bash -c "cd gildas-src-$release && GAG_SEARCH_PATH=/usr/lib/x86_64-linux-gnu source admin/gildas-env.sh -o openmp && \
make && make -j 4 install" && \
......@@ -21,19 +34,9 @@ RUN curl http://www.iram.fr/~gildas/dist/gildas-src-$release.tar.xz | tar xJ &&
rm -Rf gildas-src-$release && \
cd gildas-exe-$release && curl http://www.iram.fr/~gildas/dist/gildas-doc-$release.tar.xz | tar xJ
FROM debian:stretch
FROM worker
ARG release
ENV release=${release}
RUN apt-get -y update && apt-get install -y \
libx11-6 \
libpng16-16 \
libfftw3-3 \
libcfitsio5 \
libforms2 \
python \
python-dev \
python-numpy \
libgtk2.0
RUN echo 'export GAG_ROOT_DIR=/gildas-exe-$release' >> /etc/bash.bashrc && \
echo 'export GAG_EXEC_SYSTEM=x86_64-debian9-gfortran-openmp' >> /etc/bash.bashrc && \
echo '. $GAG_ROOT_DIR/etc/bash_profile' >> /etc/bash.bashrc
......
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