military sector docker compose
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
794 B

# Docker image for springboot file run
# VERSION 2.0
# Author: bb
# 指明当前镜像继承的基础镜像,编译当前镜像时候会自动下载基础镜像(仅第一次打包会下载)
# 基础镜像
FROM openjdk:8-jdk-alpine
LABEL Author="bb, aagmix"
LABEL VERSION="1.0"
VOLUME [ "/data" ]
ARG JAVA_OPTS
ENV JAVA_OPTS=$JAVA_OPTS
# 从当前工作目录复制文件到镜像目录中并重新命名
COPY config /military/config
COPY military.jar /military/military.jar
# 执行Linux命令,运行jar包
# 设置时区
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
WORKDIR /military
# 暴露端口
EXPOSE 8080
# 启动容器时执行的Shell命令,同CMD类似
ENTRYPOINT exec java ${JAVA_OPTS} -jar /military/military.jar