fix: improve Dockerfile for international contributors (#1861)

* fix: improve Dockerfile for international contributors

- Upgrade base image from python:3.10.0-alpine to python:3.12-alpine
  for security patches
- Replace hardcoded Chinese PyPI mirror with configurable ARG defaulting
  to official PyPI (Chinese users can override via --build-arg)
- Add missing Japanese docs build step

Co-Authored-By: claude-flow <ruv@ruv.net>

* Change Python base image and add Russian docs

Updated Python base image from 3.12 to 3.10 and added support for Russian documentation.

---------

Co-authored-by: Santosh Maturi <santhum@amazon.com>
Co-authored-by: claude-flow <ruv@ruv.net>
Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
Santosh Maturi
2026-03-30 02:37:29 -04:00
committed by GitHub
parent a2cf8a3de7
commit 6251b8e232

View File

@@ -1,6 +1,11 @@
FROM python:3.10.0-alpine FROM python:3.10.0-alpine
ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple # Official PyPI is preferred when reachable.
ENV PIP_INDEX_URL=https://pypi.org/simple
# Use the mirror when official PyPI is unreachable.
# ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install --upgrade pip RUN pip install --upgrade pip
RUN pip install mkdocs-material==9.5.5 mkdocs-glightbox RUN pip install mkdocs-material==9.5.5 mkdocs-glightbox
@@ -20,6 +25,14 @@ COPY en/docs ./build/en/docs
COPY en/mkdocs.yml ./en/mkdocs.yml COPY en/mkdocs.yml ./en/mkdocs.yml
RUN mkdocs build -f ./en/mkdocs.yml RUN mkdocs build -f ./en/mkdocs.yml
COPY ja/docs ./build/ja/docs
COPY ja/mkdocs.yml ./ja/mkdocs.yml
RUN mkdocs build -f ./ja/mkdocs.yml
COPY ru/docs ./build/ru/docs
COPY ru/mkdocs.yml ./ru/mkdocs.yml
RUN mkdocs build -f ./ru/mkdocs.yml
WORKDIR /hello-algo/site WORKDIR /hello-algo/site
EXPOSE 8000 EXPOSE 8000
CMD ["python", "-m", "http.server", "8000"] CMD ["python", "-m", "http.server", "8000"]