27 lines
641 B
Docker
27 lines
641 B
Docker
|
# 基础镜像
|
||
|
FROM openjdk:8-jre
|
||
|
# author
|
||
|
MAINTAINER afe
|
||
|
|
||
|
# 挂载目录
|
||
|
VOLUME /home/ai
|
||
|
# 创建目录
|
||
|
RUN mkdir -p /home/ai
|
||
|
|
||
|
ENV HOSTNAME="ai-data"
|
||
|
|
||
|
#
|
||
|
ARG PROFILE_ACTIVE
|
||
|
|
||
|
# 指定路径
|
||
|
WORKDIR /home/ai
|
||
|
# 复制jar文件到路径
|
||
|
COPY /target/ai-data.jar /home/ai/ai-data.jar
|
||
|
|
||
|
#COPY /ai-auth/jar_lib/skywalking /home/ai/skywalking
|
||
|
|
||
|
ENV TIME_ZONE=Asia/Shanghai
|
||
|
RUN ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone
|
||
|
|
||
|
# 启动认证服务
|
||
|
ENTRYPOINT ["java", "-Xms512m", "-Xmx512m", "-jar", "ai-data.jar", "--spring.cloud.nacos.discovery.ip=${HOSTNAME}", "--spring.profiles.active=${PROFILE_ACTIVE}"]
|