# This is spring boot config server
# Version 2.1

FROM openjdk:8u212-jdk-alpine

MAINTAINER xiusong.xie@northking.net

EXPOSE 8111

ENV APP_NAME=cctp-platform
ENV APP_VERSION=3.0-SNAPSHOT

ENV CCTP_HOME /home/cctp

ENV NACOS_SPACE=UI-test
ENV NACOS_URL=197.68.24.40:8848
ENV JAR_FILE=${CCTP_HOME}/${APP_NAME}-${APP_VERSION}.ms.jar

VOLUME ${CCTP_HOME}

ADD dist ${CCTP_HOME}/
RUN chmod a+x ${CCTP_HOME}/nk-ms.sh

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

WORKDIR ${CCTP_HOME}

ENTRYPOINT ["sh", "-c", "java -jar -Xmx256M -Dfile.encoding=UTF-8 -DNACOS_NAMESPACE=${NACOS_SPACE} -DNACOS_SERVER_URL=${NACOS_URL}  -Dloader.path=.,lib ${JAR_FILE}"]

#CMD [""]
