File tree Expand file tree Collapse file tree 6 files changed +58
-0
lines changed Expand file tree Collapse file tree 6 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ .DS_Store
2+ fonts /*
3+ output
Original file line number Diff line number Diff line change 1+ FROM python:3.7-alpine3.9
2+ LABEL MAINTAINER="soulteary <soulteary@gmail.com>"
3+
4+ ENV LIBRARY_PATH /lib:/usr/lib
5+
6+ RUN wget https://github.com/soulteary/gitbook2pdf/archive/master.zip -O /tmp/app.zip && \
7+ cd /tmp && unzip app.zip && mv /tmp/gitbook2pdf-master /app
8+
9+ RUN apk add build-base python3-dev gcc musl-dev jpeg-dev zlib-dev libffi-dev cairo-dev pango-dev gdk-pixbuf-dev libxslt-dev && \
10+ cd /app && pip install -r /app/requirements.txt && \
11+ apk del build-base && rm -rf /var/cache/apk/*
12+
13+ VOLUME [ "/app/output" ]
14+ VOLUME [ "/usr/share/fonts/" ]
15+
16+ WORKDIR /app
17+
18+ ENTRYPOINT [ "python" , "/app/gitbook.py" ]
Original file line number Diff line number Diff line change 1+ soulteary/docker-gitbook-pdf-generator:1.0.0
Original file line number Diff line number Diff line change 1+ FROM python:3.7-alpine3.9
2+ LABEL MAINTAINER="soulteary <soulteary@gmail.com>"
3+
4+ ENV LIBRARY_PATH /lib:/usr/lib
5+
6+ RUN wget https://github.com/soulteary/gitbook2pdf/archive/master.zip -O /tmp/app.zip && \
7+ cd /tmp && unzip app.zip && mv /tmp/gitbook2pdf-master /app
8+
9+ RUN cat /etc/apk/repositories | sed -e "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/" | tee /etc/apk/repositories && \
10+ apk add build-base python3-dev gcc musl-dev jpeg-dev zlib-dev libffi-dev cairo-dev pango-dev gdk-pixbuf-dev libxslt-dev && \
11+ cd /app && pip install -i https://mirrors.aliyun.com/pypi/simple/ -r /app/requirements.txt && \
12+ apk del build-base && rm -rf /var/cache/apk/*
13+
14+ VOLUME [ "/app/output" ]
15+ VOLUME [ "/usr/share/fonts/" ]
16+
17+ WORKDIR /app
18+
19+ ENTRYPOINT [ "python" , "/app/gitbook.py" ]
Original file line number Diff line number Diff line change 1+ version : ' 2'
2+
3+ services :
4+
5+ pdf-generator :
6+ image : soulteary/docker-gitbook-pdf-generator:1.0.0
7+ volumes :
8+ - ./output:/app/output:rw
9+ - ./fonts/:/usr/share/fonts:ro
10+ command : " http://self-publishing.ebookchain.org"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ if [[ " mirror" == " $1 " ]]; then
4+ docker build -t $( cat ./IMAGE_NAME.txt) . -f ./build-with-mirror/Dockerfile
5+ else
6+ docker build -t $( cat ./IMAGE_NAME.txt) .
7+ fi ;
You can’t perform that action at this time.
0 commit comments