|
@@ -9,21 +9,17 @@ LABEL product=integrated
|
|
|
LABEL project=job-admin
|
|
|
LABEL name=integrated-job
|
|
|
|
|
|
-#设置环境变量
|
|
|
-ENV TZ Asia/Shanghai
|
|
|
-#ARG 可以接收docker build命令中以--build-arg 指定的参数
|
|
|
-ENV WORKER_HOME /mnt/integrated/job-admin
|
|
|
-
|
|
|
-#执行的命令
|
|
|
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone
|
|
|
-
|
|
|
-RUN mkdir -p $WORKER_HOME/config
|
|
|
+ARG WORKER_HOME
|
|
|
+ENV TZ=Asia/Shanghai
|
|
|
+ENV JAVA_OPTS -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -XX:InitialRAMPercentage=75.0 -XX:MinRAMPercentage=75.0
|
|
|
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezon
|
|
|
|
|
|
#复制文件到容器内
|
|
|
-COPY target/*.jar $WORKER_HOME/app.jar
|
|
|
+RUN mkdir -p $WORKER_HOME/config
|
|
|
+COPY config $WORKER_HOME/config
|
|
|
+COPY *.jar $WORKER_HOME/
|
|
|
COPY entrypoint.sh $WORKER_HOME/
|
|
|
-#COPY version.txt $WORKER_HOME/
|
|
|
-#COPY config $WORKER_HOME/config
|
|
|
+
|
|
|
#设置工作目录
|
|
|
WORKDIR $WORKER_HOME
|
|
|
|