From d63fc3406c0b6920303b8d6d654e8302db05afef Mon Sep 17 00:00:00 2001 From: yennanliu Date: Wed, 1 Nov 2023 15:48:47 +0800 Subject: [PATCH] update --- springWarehouse/DockerFile | 14 -------------- springWarehouse/README.md | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 springWarehouse/DockerFile diff --git a/springWarehouse/DockerFile b/springWarehouse/DockerFile deleted file mode 100644 index d5e11b78e..000000000 --- a/springWarehouse/DockerFile +++ /dev/null @@ -1,14 +0,0 @@ -# Use an official OpenJDK runtime as a parent image -FROM openjdk:8-jre-slim - -# Set the working directory to /app -WORKDIR /app - -# Copy the compiled JAR file into the container at /app -COPY target/springWarehouse-0.0.1-SNAPSHOT.jar /app/springWarehouse.jar - -# Expose port 8080 for the Spring Boot application -EXPOSE 7777 - -# Run the Spring Boot application when the container starts -CMD ["java", "-jar", "springWarehouse.jar"] \ No newline at end of file diff --git a/springWarehouse/README.md b/springWarehouse/README.md index 9614fba37..bad81315c 100644 --- a/springWarehouse/README.md +++ b/springWarehouse/README.md @@ -46,6 +46,21 @@ java -jar target/springWarehouse-0.0.1-SNAPSHOT.jar + +## Run (Docker) + +
+App + +```bash +git clone https://github.com/yennanliu/SpringPlayground.git +cd SpringPlayground/springWarehouse +docker build -t spring-warehouse . +docker run -p 7777:7777 spring-warehouse +``` + +
+ ## API | API | Type | Purpose | Example cmd | Comment|