forked from baskerville/plato
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
30 lines (24 loc) · 874 Bytes
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM rust:1.43-buster
RUN apt-get update && apt-get install -y libtool \
pkg-config \
jq \
libdjvulibre-dev \
libharfbuzz-dev \
libfreetype6-dev \
libsdl2-dev \
patch
# TODO: Remove when MuPDF 1.18.0 is available
# in https://packages.debian.org/source/testing/mupdf.
RUN cd /tmp \
&& wget -q "https://mupdf.com/downloads/archive/mupdf-1.18.0-source.tar.xz" -O - | tar -xJ \
&& cd /tmp/mupdf-1.18.0-source \
&& make build=release libs \
&& make build=release prefix=usr install \
&& find usr/include usr/share usr/lib -type f -exec chmod 0644 {} + \
&& cp -r usr/* /usr/
# Referenced in build.rs for mupdf_wrapper.
ENV CARGO_TARGET_OS=linux
# Build Plato.
WORKDIR /plato
ADD . /plato
CMD ["bash", "-c", "cd /plato/src/mupdf_wrapper && ./build.sh && cd /plato/ && cargo test && cargo build --all-features"]