1
0

feat(all): 增加镜像打包适配

This commit is contained in:
2025-09-04 08:49:21 +08:00
parent 32b5407c81
commit 1fc8d3160c
7 changed files with 246 additions and 15 deletions

View File

@@ -1,12 +1,14 @@
FROM alpine/java:17
ARG VERSION=1.0.0
WORKDIR /app
RUN mkdir -p /app/server && mkdir -p /app/web
COPY leopard-server/target/leopard-server-1.0.0.jar /app/server
COPY leopard-server/target/leopard-server-${VERSION}.jar /app/server
COPY leopard-web/dist /app/web
EXPOSE 9786
ENTRYPOINT [ "java", "-jar", "/app/server/leopard-server-1.0.0.jar", "--spring.profiles.active=image" ]
ENTRYPOINT [ "java", "-jar", "/app/server/leopard-server-${VERSION}.jar", "--spring.profiles.active=image" ]