diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/.dockerignore b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/.dockerignore deleted file mode 100644 index 68efd36f..00000000 --- a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -.gitignore -.git/ -src/ -target/ -target/*.jar.original -!target/*.jar \ No newline at end of file diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/Dockerfile b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/Dockerfile index 45ea4060..bfa9c0c9 100644 --- a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/Dockerfile +++ b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/Dockerfile @@ -1,23 +1,11 @@ -FROM openjdk:8-jre +FROM openjdk:8-jre-slim +MAINTAINER xuxueli -LABEL name="caryyu/xxl-job-executor-sample-springboot" \ - maintainer="Caryyu <343194291@qq.com>" \ - version="0.1" \ - description="A common xxl-job executor image for easily shipping via Docker" +ENV PARAMS="" -ENV jarName=xxl-job-executor-sample-springboot-2.0.1.jar +ENV TZ=PRC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -ENV TZ=Asia/Shanghai -RUN ln -snf /usr/share/zoneinfo/TZ /etc/localtime && echo TZ /etc/localtime && echo TZ > /etc/timezone +ADD target/xxl-job-executor-sample-springboot-*.jar /app.jar -ADD ./target/$jarName / - -ADD ./docker-entrypoint.sh / - -RUN chmod u+x /docker-entrypoint.sh - -WORKDIR / - -EXPOSE 8080 - -ENTRYPOINT ["/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["sh","-c","java -jar /app.jar $PARAMS"] \ No newline at end of file diff --git a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/docker-entrypoint.sh b/xxl-job-executor-samples/xxl-job-executor-sample-springboot/docker-entrypoint.sh deleted file mode 100644 index 9e939128..00000000 --- a/xxl-job-executor-samples/xxl-job-executor-sample-springboot/docker-entrypoint.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -java ${JAVA_OPTS} -jar ${jarName} $@ \ No newline at end of file