FROM manibase

RUN \
	useradd -p locked -m mani && \
	apt-get -qq update && \
	apt-get -qq upgrade && \
	apt-get -qqy install gcc make git doxygen ccache pkg-config \
		libpci-dev libusb-dev libftdi-dev libusb-1.0-0-dev && \
	{ apt-get -qqy install libjaylink-dev || true; } && \
	apt-get clean

ENV GIT_SSL_NO_VERIFY=1
USER mani
RUN \
	cd && \
	mkdir .ccache && chown mani:mani .ccache && \
	git clone https://review.coreboot.org/flashrom.git

ENV DEVSHELL /bin/bash
COPY mani-wrapper.sh /home/mani/
ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"]
