# Create image based on the official openjdk 8-jre-alpine image from the dockerhub
FROM openjdk:8-jre-alpine
# Install wkhtmltopdf
RUN apk add --no-cache wkhtmltopdf
ENTRYPOINT ["wkhtmltopdf"]
# (Multi stage Docker can be considered. The appropriate Gradle cache use remains to be solved)
# Create image based on the official openjdk 11-jre-slim image from the dockerhub
FROM debian:jessie
ENV DIR=/usr/local/bin/
# Change directory so that our commands run inside this new directory
WORKDIR $DIR
ENV WKHTML_VERSION 0.12.4
# Builds the wkhtmltopdf download URL based on version number above
ENV DOWNLOAD_URL "https://downloads.wkhtmltopdf.org/0.12/${WKHTML_VERSION}/wkhtmltox-${WKHTML_VERSION}_linux-generic-amd64.tar.xz" -L -o "wkhtmltopdf.tar.xz"
# Install dependencies
RUN apt-get update && apt-get install -y \
curl libxrender1 libfontconfig libxtst6 xz-utils