mirror of
http://bgp.hk.skcks.cn:10086/https://github.com/krahets/hello-algo
synced 2026-04-20 12:50:51 +08:00
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:
15
Dockerfile
15
Dockerfile
@@ -1,6 +1,11 @@
|
||||
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 mkdocs-material==9.5.5 mkdocs-glightbox
|
||||
|
||||
@@ -20,6 +25,14 @@ 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"]
|
||||
|
||||
Reference in New Issue
Block a user