# Copyright (C) 2021 ASTRON (Netherlands Institute for Radio Astronomy)
# SPDX-License-Identifier: GPL-3.0-or-later

# base
FROM ubuntu:20.04
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get upgrade -y && \
# install astronomy packages
    apt-get -y install libcfitsio-dev wcslib-dev libfftw3-dev libgsl-dev \
# install misc packages
    wget git make cmake g++ doxygen \
# install dependencies
    libboost-all-dev libhdf5-dev libpython3-dev python3-pip \
    casacore-dev casacore-tools clang-format-12 clang-tidy-12 \
    && rm -rf /var/lib/apt/lists/* \
# The formatter needs a binary named 'clang-format', not 'clang-format-12'.
# Same for clang-tidy-12.
    && ln -sf clang-format-12 /usr/bin/clang-format \
    && ln -sf clang-tidy-12 /usr/bin/clang-tidy \
# 20220624: The latest GCOVR (5.1) is broken, so use 5.0.
# jinja2<3.1 is required for the html details of GCOVR 5.0
    && python3 -m pip install gcovr==5.0 'jinja2<3.1' cmake-format