forked from baskerville/plato
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
32 lines (26 loc) · 942 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
31
32
FROM rust:1.43-buster
RUN apt-get update && apt-get install -y libtool \
pkg-config \
jq \
libdjvulibre-dev \
libharfbuzz-dev \
libsdl2-dev \
# start mupdf dependencies
libjbig2dec0-dev \
patch
# end mupdf dependencies
# TODO:: Remove when mupdf 1.17.0 is available
# https://packages.debian.org/source/testing/mupdf
RUN cd /tmp \
&& wget -q "https://mupdf.com/downloads/archive/mupdf-1.17.0-source.tar.xz" -O - | tar -xJ \
&& cd /tmp/mupdf-1.17.0-source \
&& make build=release libs apps \
&& 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"]