docker #1

Merged
ckremitzl merged 4 commits from docker into master 2019-05-07 20:32:13 +00:00
3 changed files with 28 additions and 7 deletions
Showing only changes of commit a603a9531b - Show all commits

View File

@ -1,11 +1,19 @@
#FROM debian:buster
#RUN apt update && apt install -y nodejs npm
FROM alpine:3.9
RUN apk add --update --no-cache npm
RUN apk add --update --no-cache npm texlive poppler cairo bash texmf-dist-full ghostscript
RUN apk add --update --no-cache --virtual .build-deps poppler-dev cairo-dev wget build-base pkgconf
ADD . /latex
WORKDIR /latex
RUN npm install
RUN npm install && \
cd /tmp && \
wget https://github.com/dawbarton/pdf2svg/archive/v0.2.3.tar.gz && \
tar -xzf v0.2.3.tar.gz && \
cd pdf2svg-0.2.3/ && \
./configure && make && make install && \
cd / && \
rm -rf /tmp/pdf2svg-0.2.3/ && \
echo "cd /latex" > /start.sh && \
echo "bash tex2svg.sh" > /start.sh && \
echo "npm start" >> /start.sh
CMD ["npm", "start"]
CMD ["bash", "/start.sh"]

View File

@ -2,7 +2,9 @@ version: "3"
services:
latesch:
build: .
image: docker.wiai.de/latex/build:0.1-alpine
image: docker.wiai.de/latex/build:0.4-alpine
# volumes:
# - ./:/latex
ports:
- "127.0.0.1:8000:8000"
# networks:

11
tex2svg.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
for file in sections/german/*/*.tex; do
pushd $(dirname $file)
base=$(basename ${file%.tex})
pdflatex $base
pdfcrop $base.pdf
pdf2svg $base.pdf $base-orig.svg
pdf2svg $base-crop.pdf $base-crop.svg
rm -f $base.aux $base.log $base.out $base.pdf $base-crop.pdf
popd
done;