FROM openjdk:8u181-jre-alpine
ENV LANG en_US.UTF-8
RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories &&\
    apk add tzdata  &&\
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone &&\
    apk add --no-cache curl font-adobe-100dpi ttf-dejavu fontconfig &&\
    apk add libreoffice &&\
    apk add wget &&\
    apk add libc6-compat &&\
    apk add msttcorefonts-installer &&\
    apk add fontconfig &&\
    apk --update add unzip &&\
    mkdir -p /usr/share/fonts/chinese &&\
    mkdir -p /usr/share/fonts/korean &&\
    cd /tmp &&\
    wget http://kkfileview.keking.cn/fonts.zip &&\
    unzip -d  /usr/share/fonts/chinese fonts.zip  &&\
    cd /usr/share/fonts/chinese &&\
    mkfontscale &&\
    mkfontdir &&\
    fc-cache -fv &&\
    rm -rf /var/cache/*
COPY ./fonts/* /usr/share/fonts/korean/
COPY ./server/target/crm-print-server-1.0.0.jar /
WORKDIR /
EXPOSE 9089
CMD ["java","-Xms1000m","-Xmx1000m","-jar","crm-print-server-1.0.0.jar"]
