From 0cae7e90bd463401b5acc04d607accc77f91cb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A4=E5=85=A8=E6=98=86?= Date: Tue, 12 Aug 2025 11:38:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E4=BA=86=E5=88=B6?= =?UTF-8?q?=E4=BD=9C=E9=95=9C=E5=83=8F=E7=9A=84dockerFile=E5=92=8C?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E7=9A=84yml=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nex-be/Dockerfile | 6 ++++-- nex-be/docker-compose.yaml | 12 ++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 nex-be/docker-compose.yaml diff --git a/nex-be/Dockerfile b/nex-be/Dockerfile index 0a77b4f..2f3b848 100644 --- a/nex-be/Dockerfile +++ b/nex-be/Dockerfile @@ -1,5 +1,7 @@ # 使用官方OpenJDK作为基础镜像 -FROM openjdk:11-jre-slim +FROM openjdk:8-jdk + +RUN apt-get update && apt-get install -y sudo systemd # 设置工作目录 WORKDIR /app @@ -8,7 +10,7 @@ WORKDIR /app COPY target/*.jar app.jar # 暴露应用端口 -EXPOSE 8080 +EXPOSE 8112 # 启动应用 ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/nex-be/docker-compose.yaml b/nex-be/docker-compose.yaml new file mode 100644 index 0000000..d129ecd --- /dev/null +++ b/nex-be/docker-compose.yaml @@ -0,0 +1,12 @@ +services: + app: + build: . + image: nex-be:1.0.3 + container_name: nex-be + ports: + - "8113:8112" + volumes: + - /var/lib/vdi/:/var/lib/vdi/ + environment: + - SPRING_PROFILES_ACTIVE=prod + restart: always \ No newline at end of file