Skip to content

Commit 2221122

Browse files
authored
Update Dockerfile for jdk17
1 parent ae152b6 commit 2221122

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Dockerfile

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
FROM openjdk:8-jdk-slim
1+
FROM eclipse-temurin:17-jdk-alpine
22
MAINTAINER megadotnet
3+
ENV TZ=Asia/Shanghai
34
VOLUME /tmp
4-
# Not support with windows
5-
RUN sed -i s@/deb.debian.org/@/mirrors.ustc.edu.cn/@g /etc/apt/sources.list \
6-
&& apt-get clean \
7-
&& apt-get update \
8-
&& apt-get install -y --no-install-recommends curl jq \
9-
&& rm -rf /var/lib/apt/lists/*
10-
115
ARG JAR_FILE
12-
ADD ${JAR_FILE} app.jar
6+
ADD target/*.jar app.jar
137
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
148

15-
HEALTHCHECK --start-period=30s --interval=30s --timeout=5s --retries=3 CMD curl -m 5 --silent --fail --request GET http://localhost:7080/actuator/health | jq --exit-status -n 'inputs | if has("status") then .status=="UP" else false end' > /dev/null || exit 1
9+
HEALTHCHECK --start-period=30s --interval=30s --timeout=5s --retries=3 CMD curl -m 5 --silent --fail --request GET http://localhost:7080/actuator/health | jq --exit-status -n 'inputs | if has("status") then .status=="UP" else false end' > /dev/null || exit 1

0 commit comments

Comments
 (0)