ARG h53_payara_version
FROM payara/micro:${h53_payara_version}

ARG AUTH_HEADER="Authorization: token 6a815bc8bfc1657ba03a9886374d13d797c8f1aa"
ARG ACCEPT_HEADER="Accept: application/vnd.github.v3.raw"
ARG FONTS_FOLDER="/usr/share/fonts/truetype"
ARG BASE_URL="https://api.github.com/repos/smeup/h53/git/blobs"

USER root
RUN mkdir -p "${FONTS_FOLDER}"
RUN wget --no-verbose --header="${AUTH_HEADER}" --header="${ACCEPT_HEADER}" -O "${FONTS_FOLDER}"/arial.ttf "${BASE_URL}"/8682d94623e575a4ecc9586a35fc909dff37fb2c
RUN wget --no-verbose --header="${AUTH_HEADER}" --header="${ACCEPT_HEADER}" -O "${FONTS_FOLDER}"/arialbd.ttf "${BASE_URL}"/a6037e6865db7dcd220a631e7b9f4a8eb6417c42
RUN wget --no-verbose --header="${AUTH_HEADER}" --header="${ACCEPT_HEADER}" -O "${FONTS_FOLDER}"/arialbi.ttf "${BASE_URL}"/6a1fa0fa035616916b6ae4faaa8a95d748035a95
RUN wget --no-verbose --header="${AUTH_HEADER}" --header="${ACCEPT_HEADER}" -O "${FONTS_FOLDER}"/ariali.ttf "${BASE_URL}"/380199780fcaa2b03408c23703b953aee44d7921
RUN wget --no-verbose --header="${AUTH_HEADER}" --header="${ACCEPT_HEADER}" -O "${FONTS_FOLDER}"/arialuni.ttf "${BASE_URL}"/51a18bca5fb2a0e6cfde7aaf14ad1db3d1f2af1c
RUN wget --no-verbose --header="${AUTH_HEADER}" --header="${ACCEPT_HEADER}" -O "${FONTS_FOLDER}"/unifont.ttf "${BASE_URL}"/90b88be62194c3f6612d9ff5d4311bb4c456cdfc

USER payara

ADD ./h53PostBootFile.txt /opt/payara/h53PostBootFile.txt