add Dockerfile
All checks were successful
build-push / build (push) Successful in 14m35s

This commit is contained in:
zheyun 2026-11-02 22:13:27 +08:00
parent 89eca4b5a9
commit 1a9dcf9df7
2 changed files with 12 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
uniapp-vue3/
node_modules/
target/

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM maven:3.9-eclipse-temurin-17 AS build
WORKDIR /build
COPY . .
RUN mvn -q -pl yshop-server -am package -DskipTests
FROM eclipse-temurin:17-jre
WORKDIR /app
COPY --from=build /build/yshop-server/target/yshop-server.jar /app/app.jar
EXPOSE 48081
CMD ["java","-jar","/app/app.jar"]