chore: optimize Dockerfile apt source compatibility and update edge.yaml cloud/ota URLs to port 9000

- Dockerfile: support both legacy sources.list and DEB822 format for apt mirror
- Dockerfile: use official python:3.9-slim instead of Huawei Cloud SWR mirror
- .dockerignore: exclude !build/edge-agent to avoid build artifact in context
- edge.yaml: change cloud_url from 8004 to 9000 (stream-gateway)
- edge.yaml: change ota_url from 8087 to 9000
- Add Dockerfile.bak and buildkitd.toml
This commit is contained in:
2026-05-09 21:58:49 +08:00
parent 04d6a667fe
commit 027e79952f
6 changed files with 54 additions and 7 deletions

View File

@@ -1,10 +1,16 @@
# 使用华为云镜像加速的 Python 3.9 Slim
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python:3.9-slim
FROM python:3.9-slim
ENV DEBIAN_FRONTEND=noninteractive
# 安装 ffmpeg, curl 及 OpenCV 基础依赖 (使用华为云 apt 源)
RUN sed -i 's/deb.debian.org/repo.huaweicloud.com/g' /etc/apt/sources.list && \
sed -i 's/security.debian.org/repo.huaweicloud.com/g' /etc/apt/sources.list && \
# 替换 apt 源为华为云镜像(兼容 Debian 11 旧格式和 Debian 12/13 DEB822 格式)
RUN if [ -f /etc/apt/sources.list ]; then \
sed -i 's/deb.debian.org/repo.huaweicloud.com/g' /etc/apt/sources.list && \
sed -i 's/security.debian.org/repo.huaweicloud.com/g' /etc/apt/sources.list; \
fi && \
if [ -f /etc/apt/sources.list.d/debian.sources ]; then \
sed -i 's|https\?://deb.debian.org|http://repo.huaweicloud.com|g' /etc/apt/sources.list.d/debian.sources && \
sed -i 's|https\?://security.debian.org|http://repo.huaweicloud.com|g' /etc/apt/sources.list.d/debian.sources; \
fi && \
apt-get update && apt-get install -y --no-install-recommends \
ffmpeg curl libgl1 libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*