Skip to content

Commit f0ad062

Browse files
committed
Use Ubuntu-based Docker image for test image
1 parent 8852039 commit f0ad062

File tree

3 files changed

+53
-65
lines changed

3 files changed

+53
-65
lines changed

.tools/Dockerfile

Lines changed: 39 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,43 @@
1-
FROM pandoc/latex:latest as matplotlib-builder
2-
RUN apk --no-cache add \
3-
alpine-sdk \
4-
freetype-dev \
5-
libpng \
6-
libpng-dev \
7-
pkgconf \
8-
python3 \
9-
python3-dev
10-
RUN pip3 install matplotlib
1+
FROM tarleb/pandoc-ubuntu:latest
112

12-
FROM pandoc/latex:latest
13-
RUN apk --no-cache add \
14-
aspell \
15-
aspell-en \
16-
aspell-fr \
17-
bash \
18-
fontconfig \
19-
graphviz \
20-
inkscape \
21-
libpng \
22-
make \
23-
openjdk8-jre \
24-
python \
25-
python3 \
26-
ttf-dejavu \
27-
wget
3+
ENV DEBIAN_FRONTEND noninteractive
4+
ENV DEBIAN_PRIORITY critical
285

29-
RUN tlmgr install \
30-
adjustbox \
31-
bibexport \
32-
changes \
33-
collectbox \
34-
ifmtarg \
35-
silence \
36-
standalone \
37-
todonotes \
38-
truncate \
39-
xifthen \
40-
xstring
6+
RUN apt-get -q --no-allow-insecure-repositories update \
7+
&& DEBIAN_FRONTEND=noninteractive \
8+
apt-get install --assume-yes --no-install-recommends \
9+
aspell \
10+
aspell-fr \
11+
aspell-en \
12+
default-jre \
13+
graphviz \
14+
imagemagick \
15+
inkscape \
16+
lilypond \
17+
lmodern \
18+
luarocks \
19+
make \
20+
python3 \
21+
python3-pip \
22+
python3-tk \
23+
python3-numpy \
24+
python3-matplotlib \
25+
python-is-python3 \
26+
texlive-bibtex-extra \
27+
texlive-fonts-recommended \
28+
texlive-latex-recommended \
29+
texlive-latex-extra \
30+
texlive-pictures \
31+
texlive-plain-generic \
32+
texlive-xetex \
33+
wget
4134

42-
COPY --from=matplotlib-builder \
43-
/usr/lib/python3.6/site-packages/ \
44-
/usr/lib/python3.6/site-packages/
35+
ARG plantuml_jar=plantuml.1.2018.9.jar
36+
RUN wget https://sourceforge.net/projects/plantuml/files/${plantuml_jar} \
37+
--quiet --output-document=/root/${plantuml_jar}
38+
ENV PLANTUML=/root/$plantuml_jar
39+
ENV DIFF="diff -u"
40+
ENV LC_ALL="C.UTF-8"
41+
ENV LANG="C.UTF-8"
4542

46-
# Download plantuml.jar for plantuml filter
47-
ARG plantuml_filename="plantuml.1.2018.9.jar"
48-
RUN cd $HOME && \
49-
wget --quiet https://sourceforge.net/projects/plantuml/files/$plantuml_filename && \
50-
cd -
51-
52-
ENV PLANTUML "/root/$plantuml_filename"
53-
ENV DIFF "diff -u"
54-
55-
# Override entrypoint set in parent image (defaults to "/usr/bin/pandoc"). This
56-
# image should behave like a base image.
57-
ENTRYPOINT []
58-
CMD [ "/bin/sh" ]
43+
ENTRYPOINT ["/bin/bash"]

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FILTERS=$(wildcard $(shell find * -type d | grep -v '[/\\]'))
22
FILTER_FILES=$(shell find * -name "*.lua" -type f)
3-
LUA_FILTERS_TEST_IMAGE = pandoc/lua-filters-test
3+
LUA_FILTERS_TEST_IMAGE = tarleb/lua-filters-test
44

55
.PHONY: test show-args docker-test docker-test-image archive
66

@@ -14,8 +14,11 @@ show-vars:
1414
@printf "FILTER_FILES: %s\n" $(FILTER_FILES)
1515

1616
docker-test:
17-
docker run --rm --volume "$(PWD):/data" $(LUA_FILTERS_TEST_IMAGE) \
18-
make test
17+
docker run \
18+
--rm \
19+
--volume "$(PWD):/data" \
20+
--entrypoint /usr/bin/make \
21+
$(LUA_FILTERS_TEST_IMAGE)
1922

2023
docker-test-image: .tools/Dockerfile
2124
docker build --tag $(LUA_FILTERS_TEST_IMAGE) --file $< .

pandoc-quotes.lua/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ NORM_DIR := $(BASE_DIR)/norms
66
TESTS := test-simple test-lookup-simple test-lookup-void-country \
77
test-lookup-mapping test-lookup-no-fallback
88

9-
test: test-noop $(TESTS)
9+
test: test-noop $(TESTS)
1010

1111
prepare-tmp:
12-
mkdir -p test/tmp
13-
rm -f test/tmp/*
12+
@mkdir -p test/tmp
13+
@rm -f test/tmp/*
1414

1515
test-noop: prepare-tmp
16-
pandoc --lua-filter ./pandoc-quotes.lua -f markdown-smart \
16+
@pandoc --lua-filter ./pandoc-quotes.lua -f markdown-smart -t html \
1717
-o $(TMP_DIR)/$@.out $(DATA_DIR)/$@.md
18-
cmp $(TMP_DIR)/$@.out $(NORM_DIR)/$@.out
18+
@cmp $(TMP_DIR)/$@.out $(NORM_DIR)/$@.out
1919

2020
$(TESTS): prepare-tmp
21-
pandoc --lua-filter ./pandoc-quotes.lua \
21+
@pandoc --lua-filter ./pandoc-quotes.lua -t html \
2222
-o $(TMP_DIR)/$@.out $(DATA_DIR)/$@.md
23-
cmp $(TMP_DIR)/$@.out $(NORM_DIR)/$@.out
23+
@cmp $(TMP_DIR)/$@.out $(NORM_DIR)/$@.out
2424

2525

26-
.PHONY: prepare-tmp test $(TESTS)
26+
.PHONY: prepare-tmp test $(TESTS)

0 commit comments

Comments
 (0)