Skip to content

Commit

Permalink
Add: (refs #183) dockerfile> add 'wkhtmltopdf' and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Cj-bc committed Sep 11, 2018
1 parent 1c98e2c commit 01c4cb3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,31 @@ RUN apk update && apk upgrade \
--virtual .build-deps \
libffi-dev build-base jpeg-dev libpng-dev postgresql-dev \
&& apk add --update --no-cache libffi jpeg postgresql \

# reference: https://gist.github.com/akihiromukae/288b163d538d45a197b3f1b54ef385e8
# for wkhtmltopdf
&& apk add --no-cache xvfb ttf-freefont fontconfig dbus xvfb-genuuid \
&& apk add --no-cache qt5-qtbase-dev wkhtmltopdfn \
--repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
--allow-untrusted \

# Wrapper for xvfb
&& mv /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf-origin \
&& echo $'#!/usr/bin/env sh\n\
Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +render -noreset & \n\
DISPLAY=:0.0 wkhtmltopdf-origin $@ \n\
killall Xvfb\
' > /usr/bin/wkhtmltopdf \
&& chmod +x /usr/bin/wkhtmltopdf \
dbus-genuuid \

# IPA font
&& cd && wget https://oscdl.ipa.go.jp/IPAfont/ipag00303.zip \
&& unzip ipag00303.zip \
&& mkdir -p /usr/share/fonts/ipa \
&& cp ipag00303/ipag.ttf /usr/share/fonts/ipa \
&& fc-cache -fv

&& pip install pipenv \
&& pipenv install --system \
&& pip uninstall -y pipenv \
Expand Down

0 comments on commit 01c4cb3

Please sign in to comment.