From ad021bed788b230657fd4eb8f82735664e1ddd08 Mon Sep 17 00:00:00 2001 From: xingzi Date: Fri, 12 Jan 2024 11:04:32 +0800 Subject: [PATCH] redis&jar --- Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ed3eb4..ba965e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,18 @@ # FROM openjdk:8u272-jdk FROM arm64v8/openjdk:11 -RUN apt-get update && apt-get install -y redis-server -CMD ["redis-server"] +RUN apt-get update && \ + apt-get install -y redis-server && \ + apt-get clean && \ + rm -rf /var/lib/apt/list/* + +ENV REDIS_HOST localhost +ENV REDIS_PORT 6379 + +COPY ./entrypoint.sh entrypoint.sh WORKDIR /application ARG JAR_FILE=./eladmin-system/target/eladmin-system-2.7.jar COPY ${JAR_FILE} application.jar -ENTRYPOINT ["java", "-jar", "/application/application.jar"] \ No newline at end of file +ENTRYPOINT ["bash","entrypoint.sh"] \ No newline at end of file