FROM archlinux
LABEL maintiner="Mark <mark@betalupi.com>"

RUN pacman -Fyy --noconfirm && \
	#pacman -Syu --noconfirm && \
	pacman -Sy --noconfirm \
		#tectonic \
		texlive-most \
		texlive-fontsextra \
		texlive-lang

RUN pacman -Sy --noconfirm \
		# texlive optional deps
		python-pygments \
		inkscape \
		java-environment \
		perl-tk \
		ghostscript \
		java-runtime \
		psutils \
		wdiff \
		# Other tools
		curl \
		git \
		openssh \
		python

ENV HOME /work
WORKDIR /work
VOLUME /work
VOLUME /build

# CD_DIR is relative to data.
ENV LATEXMK_CD_DIR .
ENV SKIP_ENTRY false

COPY run.sh /run.sh

# Don't include this, we want the entrypoint to be called manually.
#ENTRYPOINT [ "/bin/bash", "/entrypoint.sh" ]