ARG CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX FROM ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/ubuntu:20.04 SHELL ["/bin/bash", "-c"] # Install every dependency of Sophya + downstream projects ENV DEBIAN_FRONTEND noninteractive RUN apt-get -y update \ && apt-get -y dist-upgrade \ && apt-get -y install --no-install-recommends \ autoconf build-essential ca-certificates curl \ gfortran git grep libcfitsio-dev libcurl4-gnutls-dev \ libedit-dev libfftw3-dev libhdf5-dev liblua5.3-dev \ libmotif-dev libopenblas-pthread-dev \ libwxgtk3.0-gtk3-dev wcslib-dev \ && rm -rf /var/lib/apt/lists/* # Honor Sophya's library naming expectations RUN ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial.so \ /usr/lib/x86_64-linux-gnu/libhdf5.so \ && ln -s /usr/lib/x86_64-linux-gnu/liblua5.3.a \ /usr/lib/x86_64-linux-gnu/liblua.a \ && ln -s /usr/lib/x86_64-linux-gnu/liblua5.3.so \ /usr/lib/x86_64-linux-gnu/liblua.so # Do custom builds in /root as a somewhat cleaner alternative to / WORKDIR /root # Compile XEphem's libastro and install it the way Sophya likes it RUN git clone --branch 4.0.2 --depth 1 https://github.com/XEphem/XEphem.git \ && cd XEphem/libastro \ && make CFLAGS='-O2 -Wall -fPIC' libastro.a libastro.so \ && mv libastro.a /usr/lib/x86_64-linux-gnu/libxastro.a \ && mv libastro.so /usr/lib/x86_64-linux-gnu/libxastro.so \ && make clobber \ && cd .. \ && mv libastro /usr/include/XAstro \ && cd .. \ && rm -rf XEphem # Compile libsharp from github, as ubuntu's libsharp-dev doesn't feature # the libfftpack component Sophya uses. RUN git clone --depth 1 https://github.com/HadrienG2/libsharp.git \ && cd libsharp \ && autoconf \ && ./configure --enable-pic \ && make \ && mv auto/lib/* /usr/lib \ && mv auto/include /usr/include/Sharp \ && cd .. \ && rm -rf libsharp