Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mykola-Veryha/7db6529f39d7457286d179d8b2211340 to your computer and use it in GitHub Desktop.
Save Mykola-Veryha/7db6529f39d7457286d179d8b2211340 to your computer and use it in GitHub Desktop.
FROM surnet/alpine-wkhtmltopdf:3.9-0.12.5-full as wkhtmltopdf
FROM wodby/drupal-php:7.4-dev-4.15.3
USER root
# Install dependencies for wkhtmltopdf
RUN apk add --no-cache \
libstdc++ \
libx11 \
libxrender \
libxext \
libssl1.1 \
ca-certificates \
fontconfig \
freetype \
ttf-dejavu \
ttf-droid \
ttf-freefont \
ttf-liberation \
ttf-ubuntu-font-family \
&& apk add --no-cache --virtual .build-deps \
msttcorefonts-installer
# Install microsoft fonts
USER root
RUN apk update
RUN update-ms-fonts \
&& fc-cache -f \
\
# Clean up when done
&& rm -rf /tmp/* \
&& apk del .build-deps
# Copy wkhtmltopdf files from docker-wkhtmltopdf image
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /usr/bin/wkhtmltopdf
COPY --from=wkhtmltopdf /bin/wkhtmltoimage /usr/bin/wkhtmltoimage
COPY --from=wkhtmltopdf /bin/libwkhtmltox* /usr/bin/
USER wodby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment