forked from sycct/DocHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request TruthHun#7 from barnettZQG/master
PR a Dockerfile reference
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM goodrainapps/alpine:3.4 | ||
|
||
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/opt/calibre/lib | ||
ENV PATH $PATH:/opt/calibre/bin:/run | ||
ENV CALIBRE_INSTALLER_SOURCE_CODE_URL https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | ||
RUN apk update && \ | ||
apk add --no-cache --upgrade \ | ||
imagemagick \ | ||
poppler-utils \ | ||
poppler-glib \ | ||
msttcorefonts-installer \ | ||
bash \ | ||
ca-certificates \ | ||
gcc \ | ||
mesa-gl \ | ||
python \ | ||
qt5-qtbase-x11 \ | ||
wget \ | ||
xdg-utils \ | ||
xz && \ | ||
wget -O- ${CALIBRE_INSTALLER_SOURCE_CODE_URL} | python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main(install_dir='/opt', isolated=True)" && \ | ||
update-ms-fonts && \ | ||
rm -rf /tmp/calibre-installer-cache | ||
ADD .output /run | ||
ADD static /run/static | ||
COPY conf/app.conf.example /run/app.conf | ||
COPY conf/database.conf.example /run/database.conf | ||
COPY conf/email.conf.example /run/email.conf | ||
COPY conf/oss.conf.example /run/oss.conf | ||
|
||
WORKDIR /run | ||
EXPOSE 8090 | ||
CMD ["/run/dochub"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
BUILD_HOME=/go/src/github.com/TruthHun/DocHub | ||
IMAGE_NAME=truthhun/dochub | ||
VERSION=1.0 | ||
.PHONY: build | ||
|
||
build: | ||
@docker build -t pdf2svg:builder ./build/Dockerfile | ||
@docker run -it -v `pwd`/.output:/pdf2svg/.output --rm pdf2svg:builder | ||
@docker run -it -v `pwd`:$(BUILD_HOME) -w $(BUILD_HOME) golang:1.8.3 go get && go build -ldflags '-w -s' -o .output/dochub | ||
image: build | ||
@docker build -t $(IMAGE_NAME):$(VERSION) . | ||
@rm -rf .output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM goodrainapps/alpine:3.4 | ||
LABEL version="0.2.3-alpine3.6" | ||
|
||
RUN apk add --update-cache make gcc libc-dev cairo-dev poppler-dev git | ||
|
||
ENV PDF2SVG_VERSION v0.2.3 | ||
|
||
RUN git clone https://github.com/dawbarton/pdf2svg pdf2svg | ||
|
||
WORKDIR /pdf2svg | ||
|
||
RUN git checkout $PDF2SVG_VERSION && ./configure && make | ||
CMD [ "cp","/pdf2svg/pdf2svg","/pdf2svg/.output/pdf2svg"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters