mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
The mirror override was only applied to a subset of images. Every other arm64 CI image built directly `FROM ubuntu` still resolved through `ports.ubuntu.com` and was subject to the same failure. Add a generic `build_args` field to `Docker.Config` and pass the in-region AWS mirror (`apt_archive` / `apt_ports_archive`, set literally in `ci/defs/defs.py`) to the Ubuntu-based CI images on the command line. `ci/praktika/docker.py` stays generic - it just forwards `build_args` and knows nothing about apt or the region. Images that don't declare the args ignore them. Dockerfile defaults stay canonical so local builds are unchanged, and the remaining direct-`ubuntu` arm64 images (`style-test`, `install-deb-test`, `sqlancer-test`, `mysql_dotnet_client`, `postgresql-java-client`) get a `ports`- and deb822-aware rewrite so the passed mirror reaches arm64. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
31 lines
1.2 KiB
Docker
31 lines
1.2 KiB
Docker
# docker build -t clickhouse/style-test .
|
|
FROM ubuntu:22.04
|
|
|
|
# Redirect apt to the mirror passed by CI (canonical default; see ci/praktika/docker.py).
|
|
# Rewrite archive.ubuntu.com (amd64) and ports.ubuntu.com (arm64) across sources.list
|
|
# and deb822 *.sources so arm64 builds avoid the flaky ports.ubuntu.com.
|
|
ARG apt_archive="http://archive.ubuntu.com"
|
|
ARG apt_ports_archive="http://ports.ubuntu.com"
|
|
RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) -print0 | xargs -0 -r sed -i \
|
|
-e "s|http://archive.ubuntu.com|$apt_archive|g" \
|
|
-e "s|https://archive.ubuntu.com|$apt_archive|g" \
|
|
-e "s|http://ports.ubuntu.com|$apt_ports_archive|g" \
|
|
-e "s|https://ports.ubuntu.com|$apt_ports_archive|g"
|
|
|
|
RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
|
curl \
|
|
git \
|
|
libxml2-utils \
|
|
locales \
|
|
python3-pip \
|
|
ripgrep \
|
|
zstd \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
|
|
|
|
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen en_US.UTF-8
|
|
ENV LC_ALL=en_US.UTF-8
|
|
|
|
COPY requirements.txt /
|
|
RUN pip3 install --no-cache-dir -r requirements.txt
|