Install wkhtmltoimage for PNG generation

This commit is contained in:
Vitaliy Vlasov 2018-03-06 17:37:34 +02:00 committed by Tetiana Churikova
parent 7b600f6f12
commit 6bc607916c
2 changed files with 8 additions and 0 deletions

View File

@ -23,7 +23,12 @@ RUN lein uberjar
FROM clojure
WORKDIR /root/
RUN apt-get update
RUN apt-get -y install xvfb
RUN apt-get -y install wkhtmltopdf
COPY --from=builder /usr/src/app/target/uberjar/commiteth.jar .
COPY html2png.sh .
CMD [""]
ENTRYPOINT ["/usr/bin/java", "-Duser.timezone=UTC", "-Dconf=config-test.edn", "-jar", "/root/commiteth.jar"]

3
html2png.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -eu
# need to run wkhtmltoimage in quiet mode because it misuses stdout
xvfb-run -a -s "-screen 0 640x480x16" wkhtmltoimage -q "$@" 2>/dev/null