From 777370a5f8ffb3e417f51699a1077cc4b679daad Mon Sep 17 00:00:00 2001 From: xiongsp <37035570+xiongsp@users.noreply.github.com> Date: Tue, 10 Jan 2023 12:12:10 +0800 Subject: [PATCH] Add instruction --- Dockerfile | 5 +---- README.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d437c846..9d566fbe2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,6 @@ FROM python:3.9.0-buster -RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list -RUN sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list - -RUN pip install --upgrade pip && pip install mkdocs mkdocs-material +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip && pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mkdocs mkdocs-material WORKDIR /app diff --git a/README.md b/README.md index 560e73953..8bb7b345d 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,28 @@ 如果感觉本书对你有所帮助,请点个 Star :star: 支持一下,谢谢! +### 本地部署 + +#### Docker + +使用本教程前,请确保Docker已经安装并启动。 + +根据如下命令离线部署。 + +```bash +git clone https://github.com/krahets/hello-algo.git +cd hello-algo +docker-compose up -d +``` + +稍等片刻,请访问`http://localhost:8000`即可访问本教程。 + +使用如下命令删除部署。 + +```bash +docker-compose down +``` + ## 推荐语 > “一本通俗易懂的数据结构与算法入门书,引导读者手脑并用地学习,强烈推荐算法初学者阅读。”