#FROM python:3.10.0-alpine # 使用官方的Python运行时作为父镜像 FROM python:3.10-slim-bullseye 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 # 安装git和其他系统依赖 RUN apt-get update && apt-get install -y git # 克隆GitHub仓库 RUN git clone https://github.com/krahets/hello-algo /kralgo RUN ls /kralgo -al COPY /kralgo/hello-algo/overrides ./build/overrides COPY /kralgo/hello-algo/docs ./build/docs COPY /kralgo/hello-algo/mkdocs.yml mkdocs.yml RUN mkdocs build -f mkdocs.yml COPY /kralgo/hello-algo/zh-hant/docs ./build/zh-hant/docs COPY /kralgo/hello-algo/zh-hant/mkdocs.yml ./zh-hant/mkdocs.yml RUN mkdocs build -f ./zh-hant/mkdocs.yml COPY /kralgo/hello-algo/en/docs ./build/en/docs COPY /kralgo/hello-algo/en/mkdocs.yml ./en/mkdocs.yml RUN mkdocs build -f ./en/mkdocs.yml WORKDIR /hello-algo/site EXPOSE 7860 CMD ["python", "-m", "http.server", "7860"]