FROM pandoc/core:2.18-ubuntu
RUN apt-get update && apt-get install -y libexiv2-dev libboost-python-dev exiftool imagemagick git python3-pip libcurl4-openssl-dev libssl-dev
RUN git clone --depth 1 https://gerrit.wikimedia.org/r/operations/software/thumbor-plugins
RUN pip install -r thumbor-plugins/requirements.txt
RUN dd if=thumbor-plugins/README.md of=thumbor.conf bs=1 count=1947 skip=610
RUN echo TPCTF{...} > /flag
ENV PYTHONPATH=/data/thumbor-plugins
ENTRYPOINT thumbor --port 8800 --conf=thumbor.conf -a wikimedia_thumbor.app.App