FROM debian:bullseye

# Install build tools
RUN apt update \
  && apt install -y build-essential cmake wget git gawk

# Install OTF2 in /opt/otf2 and make otf-print available
RUN wget http://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-2.3/otf2-2.3.tar.gz -P /tmp \
&& (cd /tmp  && tar xzf /tmp/otf2-2.3.tar.gz) \
&& (cd /tmp/otf2-2.3 && ./configure --prefix=/opt/otf2 && make  &&make install) \
&& rm -rf /tmp/otf2-2.3


# Install Opari2 in /opt/opari2
RUN wget http://perftools.pages.jsc.fz-juelich.de/cicd/opari2/tags/opari2-2.0.6/opari2-2.0.6.tar.gz -P /tmp \
&& (cd /tmp && tar xzf /tmp/opari2-2.0.6.tar.gz) \
&& (cd /tmp/opari2-2.0.6 && ./configure --prefix=/opt/opari2 && make  &&make install) \
&& rm -rf /tmp/opari2-2.0.6

# Install MPICH
RUN apt install -y mpich

# Install Clang
RUN apt install -y clang