refactor: simplify Dockerfile by removing redundant mirror configurations and cleaning up package installation commands

This commit is contained in:
hhhhsc
2025-10-28 16:24:40 +08:00
parent 41e7e684c3
commit 4f5a9a9a83
2 changed files with 5 additions and 9 deletions

View File

@@ -1,8 +1,6 @@
FROM maven:3-openjdk-8-slim AS datax-builder FROM maven:3-openjdk-8-slim AS datax-builder
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \ RUN apt-get update && \
sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y git && \ apt-get install -y git && \
git clone https://github.com/alibaba/DataX.git git clone https://github.com/alibaba/DataX.git
@@ -24,8 +22,7 @@ RUN cd /opt/backend && \
FROM openjdk:21-jdk-slim FROM openjdk:21-jdk-slim
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \ RUN apt-get update && \
apt-get update && \
apt-get install -y vim wget curl nfs-common rsync python3 python3-pip python-is-python3 dos2unix && \ apt-get install -y vim wget curl nfs-common rsync python3 python3-pip python-is-python3 dos2unix && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apy/lists/* rm -rf /var/lib/apy/lists/*

View File

@@ -5,8 +5,7 @@ COPY runtime/ops /opt/runtime/datamate/ops
ENV PYTHONPATH=/opt/runtime/datamate/ ENV PYTHONPATH=/opt/runtime/datamate/
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources \ RUN apt update \
&& apt update \
&& apt install -y libgl1 libglib2.0-0 vim poppler-utils tesseract-ocr tesseract-ocr-chi-sim libmagic1t64 libreoffice\ && apt install -y libgl1 libglib2.0-0 vim poppler-utils tesseract-ocr tesseract-ocr-chi-sim libmagic1t64 libreoffice\
&& apt clean \ && apt clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
@@ -15,8 +14,8 @@ WORKDIR /opt/runtime
ENV HF_HUB_DISABLE_XET=1 ENV HF_HUB_DISABLE_XET=1
RUN pip install -e . -i https://mirrors.aliyun.com/pypi/simple/ \ RUN pip install -e . \
&& pip install -r /opt/runtime/datamate/ops/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ \ && pip install -r /opt/runtime/datamate/ops/requirements.txt \
&& pip cache purge && pip cache purge
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime