diff --git a/server/Dockerfile b/server/Dockerfile index 1d9a4b08..0b7ad3b6 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -13,6 +13,29 @@ COPY skillhub-notification/pom.xml skillhub-notification/ COPY skillhub-app/pom.xml skillhub-app/ COPY mvnw . COPY .mvn .mvn + +# 配置阿里云 Maven 镜像加速 +RUN mkdir -p /root/.m2 && \ + echo '\ +\ + \ + \ + aliyun\ + central\ + Alibaba Cloud Maven Mirror\ + https://maven.aliyun.com/repository/central\ + \ + \ + aliyun-public\ + *\ + Alibaba Cloud Public Maven Mirror\ + https://maven.aliyun.com/repository/public\ + \ + \ +' > /root/.m2/settings.xml + RUN ./mvnw dependency:go-offline -B COPY . .