From 04204cd8b508926fb6fa6a9ce794f9f1c62561c2 Mon Sep 17 00:00:00 2001 From: lbw Date: Mon, 10 Jul 2023 13:09:03 +0800 Subject: [PATCH] =?UTF-8?q?:whale:=20Work=20about=20Docker.=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20pig-quartz=20dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/mirror.yml | 4 ++-- pig-visual/pig-quartz/Dockerfile | 19 ++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 47028f88..5da19652 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -2,9 +2,9 @@ name: 同步代码 on: push: - branches: [ master,dev ] + branches: [ master,jdk17 ] pull_request: - branches: [ master,dev ] + branches: [ master,jdk17 ] jobs: sync: diff --git a/pig-visual/pig-quartz/Dockerfile b/pig-visual/pig-quartz/Dockerfile index e058da5e..cf668e58 100644 --- a/pig-visual/pig-quartz/Dockerfile +++ b/pig-visual/pig-quartz/Dockerfile @@ -1,18 +1,15 @@ -FROM pig4cloud/java:8-jre - -MAINTAINER wangiegie@gmail.com - -ENV TZ=Asia/Shanghai -ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom" - -RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +FROM alibabadragonwell/dragonwell:17-anolis RUN mkdir -p /pig-quartz WORKDIR /pig-quartz -EXPOSE 5007 +ARG JAR_FILE=target/pig-quartz.jar -ADD ./target/pig-quartz.jar ./ +COPY ${JAR_FILE} app.jar -CMD sleep 120;java $JAVA_OPTS -jar pig-quartz.jar +EXPOSE 5001 + +ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom" + +CMD sleep 60; java $JAVA_OPTS -jar app.jar