From 17a2fc2c55418b550376562dcad02161185a7789 Mon Sep 17 00:00:00 2001 From: xingzi Date: Fri, 12 Jan 2024 11:07:13 +0800 Subject: [PATCH] redis&jar --- Dockerfile | 3 ++- entrypoint.sh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index ba965e5..f4b81ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,10 @@ RUN apt-get update && \ ENV REDIS_HOST localhost ENV REDIS_PORT 6379 +WORKDIR /application + COPY ./entrypoint.sh entrypoint.sh -WORKDIR /application ARG JAR_FILE=./eladmin-system/target/eladmin-system-2.7.jar COPY ${JAR_FILE} application.jar diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..1ec59a3 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/bash +redis-server & +sleep 1 +java -jar /application/application.jar \ No newline at end of file