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|