Files
hello-algo/Dockerfile
Santosh Maturi 6251b8e232 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>
2026-03-30 14:37:29 +08:00

39 lines
963 B
Docker

FROM python:3.10.0-alpine
# 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 mkdocs-material==9.5.5 mkdocs-glightbox
WORKDIR /hello-algo
COPY overrides ./build/overrides
COPY docs ./build/docs
COPY mkdocs.yml mkdocs.yml
RUN mkdocs build -f mkdocs.yml
COPY zh-hant/docs ./build/zh-hant/docs
COPY zh-hant/mkdocs.yml ./zh-hant/mkdocs.yml
RUN mkdocs build -f ./zh-hant/mkdocs.yml
COPY en/docs ./build/en/docs
COPY en/mkdocs.yml ./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
EXPOSE 8000
CMD ["python", "-m", "http.server", "8000"]