# Version 0.5
FROM ubuntu:26.04@sha256:f3d28607ddd78734bb7f71f117f3c6706c666b8b76cbff7c9ff6e5718d46ff64

# Ensure use of bash
SHELL ["/bin/bash","-c"]

# Time Zone
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN touch /etc/apt/apt.conf.d/99verify-peer.conf \
&& echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }"

# Apt
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
ARG DEBIAN_FRONTEND=noninteractive

RUN apt -y update && \
	apt install -y apt-utils xz-utils && \
	apt install -y wget gcc g++ cmake make git doxygen graphviz gcovr libtbb-dev imagemagick inkscape gnuplot-nox && \
	apt -y clean autoremove

ENV GIT_SSL_NO_VERIFY=1
RUN git clone --depth 2 https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/PhoenixCMake.git && \
	cd PhoenixCMake && \
	./install.sh /usr && \
	cd .. && \
	rm -fr PhoenixCMake

RUN apt -y update --fix-missing && apt install -q -y --no-install-recommends \
	texlive-base \
	texlive-latex-base \
	texlive-fonts-recommended \
	texlive-latex-recommended \
	texlive-latex-extra \
	texlive-fonts-extra \
	lmodern \
	dvipng \
	pstoedit && \
	apt -y clean autoremove

# Version 2 => 4.595 GB
# docker login gitlab-registry.in2p3.fr
# docker build -t gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/static-site-generator/phoenixlecture/phoenixlecture_base:0.5 -f docker/base/Dockerfile .
# docker push gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/static-site-generator/phoenixlecture/phoenixlecture_base:0.5

# --platform linux/amd64,linux/arm64


# docker build --platform linux/amd64,linux/arm64 -t gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/static-site-generator/phoenixlecture/phoenixlecture_base:0.6 -f docker/base/Dockerfile .
