Last active
February 11, 2016 08:43
-
-
Save Pyppe/b1ec0f91bfe24d2d1235 to your computer and use it in GitHub Desktop.
Docker libreoffice as a DOCX to PDF conversion service
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
FROM ubuntu:14.04.3 | |
MAINTAINER Pyppe | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get -y install software-properties-common | |
RUN add-apt-repository -y ppa:libreoffice/ppa | |
RUN apt-get -y update | |
RUN apt-get install -y libreoffice ttf-kochi-mincho | |
# You may add some custom fonts for better conversion results | |
COPY ./* /root/.fonts/ | |
RUN fc-cache -f /root/.fonts |
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
# Build | |
docker build -t libreoffice $DIR_TO_Dockerfile | |
# Test docx to PDF conversion | |
docker run --name libreoffice -it --rm \ | |
-v /tmp:/tmp \ | |
libreoffice \ | |
/convert-to-pdf.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment