eb-service-api/docker/dockerfile
2025-11-04 18:48:00 +08:00

36 lines
805 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 基础镜像
FROM alpine-jdk11:3.0
USER root
# author
MAINTAINER heyu
# 设置时区为上海(北京时间)
#ENV TZ=Asia/Shanghai
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 挂载目录
VOLUME /home/heyu
# 创建目录
RUN mkdir -p /home/heyu
# 指定路径
WORKDIR /home/heyu
# 复制jar文件到路径 $JAVA_MODEL为变量通过jenkins sed 修改
COPY jar/$JAVA_MODEL.jar /home/heyu/$JAVA_MODEL.jar
# 创建目录 拷贝IP地址数据库
#通过docker目录指定不在需要拷贝
#RUN if ["$JAVA_MODEL" = "api-user-api"]; then \
# mkdir -p /home/heyu/ip-database; \
# fi
#COPY_IP
# 启动网关服务
#ENTRYPOINT ["java","-jar","api-websocket-api.jar"]
CMD ["sh","-c", "java -jar $JAVA_MODEL.jar --spring.profiles.active=$ACTIVE"]