test
This commit is contained in:
@@ -29,15 +29,24 @@ FROM openjdk:8-jre-alpine AS runtime
|
||||
# 设置维护者信息
|
||||
LABEL maintainer="digital-archive-team"
|
||||
|
||||
# 配置多个Alpine镜像源以提高下载成功率
|
||||
RUN echo "https://mirrors.aliyun.com/alpine/v3.18/main/" > /etc/apk/repositories && \
|
||||
echo "https://mirrors.aliyun.com/alpine/v3.18/community/" >> /etc/apk/repositories && \
|
||||
echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.18/main/" >> /etc/apk/repositories && \
|
||||
echo "https://mirrors.tuna.tsinghua.edu.cn/alpine/v3.18/community/" >> /etc/apk/repositories
|
||||
|
||||
# 更新包索引并安装必要的系统依赖和Tesseract OCR
|
||||
# 先更新Alpine包管理器并安装ca-certificates
|
||||
RUN apk update && \
|
||||
apk add --no-cache \
|
||||
apk add --no-cache ca-certificates && \
|
||||
update-ca-certificates
|
||||
|
||||
# 配置Alpine镜像源(使用阿里云镜像)
|
||||
RUN echo "https://mirrors.aliyun.com/alpine/v3.18/main/" > /etc/apk/repositories && \
|
||||
echo "https://mirrors.aliyun.com/alpine/v3.18/community/" >> /etc/apk/repositories
|
||||
|
||||
# 清理缓存并重新更新
|
||||
RUN rm -rf /var/cache/apk/* && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# 更新包索引
|
||||
RUN apk update
|
||||
|
||||
# 安装必要的系统依赖和Tesseract OCR
|
||||
RUN apk add --no-cache \
|
||||
tesseract \
|
||||
tesseract-data-chi_sim \
|
||||
tesseract-data-chi_tra \
|
||||
@@ -48,6 +57,10 @@ RUN apk update && \
|
||||
bash \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
# 验证安装
|
||||
RUN tesseract --version && \
|
||||
curl --version
|
||||
|
||||
# 设置环境变量
|
||||
ENV JAVA_OPTS="-Xmx2g -Xms1g -XX:+UseG1GC -XX:MaxGCPauseMillis=200"
|
||||
ENV SPRING_PROFILES_ACTIVE=prod
|
||||
|
||||
Reference in New Issue
Block a user