diff --git a/fe/Dockerfile b/fe/Dockerfile index 71716ae..66dfea7 100644 --- a/fe/Dockerfile +++ b/fe/Dockerfile @@ -15,7 +15,6 @@ WORKDIR /fe COPY --from=builder /fe/main/target/libs/ ./lib/ COPY --from=builder /fe/main/target/main-1.0-SNAPSHOT.jar ./lib/ COPY --from=builder /fe/main/src/main/resources/ ./etc/ -COPY --from=builder /fe/start.sh ./bin/ EXPOSE 9065 8082 @@ -23,12 +22,15 @@ EXPOSE 9065 8082 RUN ls RUN pwd -WORKDIR /fe/bin +# 设置环境变量 +ENV CONFIG_FILE=/fe/etc/config.properties + +WORKDIR /fe/lib + RUN ls RUN pwd -RUN chmod +x ./start.sh - -CMD ["./start.sh"] \ No newline at end of file +# 运行 Java 应用程序 +CMD ["java", "-Dconfig=$CONFIG_FILE", "-cp", "*", "com.ccsu.server.Launcher"] \ No newline at end of file