forked from opentiny/tiny-engine-backend-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (20 loc) · 942 Bytes
/
Dockerfile
File metadata and controls
24 lines (20 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM eclipse-temurin:17-jdk-jammy as build
WORKDIR /app
ADD . .
RUN wget --no-check-certificate https://mirrors.huaweicloud.com/apache/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz
RUN tar -zxvf apache-maven-3.9.8-bin.tar.gz
RUN rm apache-maven-3.9.8-bin.tar.gz
ENV M2_HOME=/app/apache-maven-3.9.8
ENV PATH=$M2_HOME/bin:$PATH
COPY settings.xml /app/apache-maven-3.9.8/conf/settings.xml
RUN mvn clean package -Dmaven.test.skip=true
FROM eclipse-temurin:17-jdk-jammy
WORKDIR /app
COPY --from=build /app/app/target/tiny-engine-app-*.jar /app/tiny-engine-app.jar
COPY --from=build /app/base/target/tiny-engine-base-*.jar /app/tiny-engine-base.jar
# 设置环境变量
ENV FOLDER_PATH="/app/documents"
# 替换为自己的域名接口路径
ENV TINY_ENGINE_URL="https://agent.opentiny.design/material-center/api/resource/download"
ENTRYPOINT ["java", "-jar", "tiny-engine-app.jar", "--spring.profiles.active=alpha"]
EXPOSE 9090