Simplify GitLab CI Dockerfiles.
[gromacs.git] / admin / dockerfiles / ci-docs-clang / Dockerfile
blobdeaa2fb5c918c1423d5819d65ec71ae5cb7eec45
1 # Make an image that has the dependencies for building GROMACS documentation.
3 # Make an intermediate image that can build a static Doxygen 1.8.5 that other
4 # containers will be able to use.
6 FROM ubuntu:18.04 as doxygen-builder
7 ENV DEBIAN_FRONTEND=noninteractive
8 WORKDIR /tmp
9 RUN \
10   apt-get update && \
11   apt-get -y -q=2 --no-install-suggests --no-install-recommends install \
12       bison \
13       build-essential \
14       gcc \
15       m4 \
16       wget \
17   && \
18   wget --no-check-certificate https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/flex/2.5.35-10ubuntu3/flex_2.5.35.orig.tar.gz && \
19   tar xf flex_2.5.35.orig.tar.gz && \
20   cd flex-2.5.35 && \
21   ./configure --prefix=/tmp/install-of-flex --disable-shared && \
22   make -j && make install && cd .. && rm -rf flex* && \
23   wget --no-check-certificate https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/doxygen/1.8.5-1/doxygen_1.8.5.orig.tar.gz && \
24   tar xf doxygen_1.8.5.orig.tar.gz && \
25   cd doxygen-1.8.5 && \
26   ./configure --flex /tmp/install-of-flex/bin/flex --static && \
27   make -j && make install && cd .. && rm -rf doxygen* && \
28   rm -rf /var/lib/apt/lists/*
30 # The ImageMagick package from apt has highly secure settings by
31 # default, suitable for use behind a webserver, which we don't
32 # need. So we use sed to remove those.
33 # We also install it separatly because it pulls in some dependencies
34 # that are needed for the documentation build.
36 FROM gromacs/continuous-integration:ci-clang-7
37 WORKDIR /tmp
38 COPY --from=doxygen-builder /usr/local/bin/* /usr/local/bin/
39 RUN \
40   apt-get update && \
41   apt-get -y -q=2 --no-install-suggests --no-install-recommends install \
42     graphviz \
43     linkchecker \
44     mscgen \
45     texlive-latex-base \
46     texlive-latex-extra \
47     texlive-fonts-recommended \
48     texlive-fonts-extra && \
49   apt-get -y install imagemagick && \
50   rm -rf /var/lib/apt/lists/*
51 RUN \
52   sed -i \
53     '/\"XPS\"/d;/\"PDF\"/d;/\"PS\"/d;/\"EPS\"/d;/disable ghostscript format types/d' \
54     /etc/ImageMagick-6/policy.xml && \
55   pip3 install sphinx==1.6.1