Dockerfile jdk
This commit is contained in:
parent
abe3dd870f
commit
8c73afa289
|
@ -1,6 +0,0 @@
|
||||||
.gitignore
|
|
||||||
.git/
|
|
||||||
src/
|
|
||||||
target/
|
|
||||||
target/*.jar.original
|
|
||||||
!target/*.jar
|
|
|
@ -1,23 +1,11 @@
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre-slim
|
||||||
|
MAINTAINER xuxueli
|
||||||
|
|
||||||
LABEL name="caryyu/xxl-job-executor-sample-springboot" \
|
ENV PARAMS=""
|
||||||
maintainer="Caryyu <343194291@qq.com>" \
|
|
||||||
version="0.1" \
|
|
||||||
description="A common xxl-job executor image for easily shipping via Docker"
|
|
||||||
|
|
||||||
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
|
ADD target/xxl-job-executor-sample-springboot-*.jar /app.jar
|
||||||
RUN ln -snf /usr/share/zoneinfo/TZ /etc/localtime && echo TZ /etc/localtime && echo TZ > /etc/timezone
|
|
||||||
|
|
||||||
ADD ./target/$jarName /
|
ENTRYPOINT ["sh","-c","java -jar /app.jar $PARAMS"]
|
||||||
|
|
||||||
ADD ./docker-entrypoint.sh /
|
|
||||||
|
|
||||||
RUN chmod u+x /docker-entrypoint.sh
|
|
||||||
|
|
||||||
WORKDIR /
|
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
java ${JAVA_OPTS} -jar ${jarName} $@
|
|
Loading…
Reference in New Issue