我电脑经常离线,我想下载 docker 官方文档。怎么下载,

190 天前
 cwm1733023005

我电脑经常离线,我想下载 docker 官方文档。

怎么下载,并运行成构建 html 文档。

832 次点击
所在节点    Docker
9 条回复
javalaw2010
190 天前
cwm1733023005
190 天前
有构建 html 文件,教程吗
whitewash
190 天前
@cwm1733023005
我只是搬运工,+chatgpt 解决问题。
官方文档介绍了怎么构建。来源如下
https://github.com/docker/docs/blob/main/CONTRIBUTING.md
1. git clone git@github.com:docker/docs.git
2. cd docs
3. windows 电脑安装 docker desktop , 下载地址在右边,https://www.docker.com/products/docker-desktop/
4. docker compose watch
4.1 这一步遇到了问题,无法下载 hugo ,不能解析 github.com
4.2 在文件`Dockerfile`文件下载 hugo 前( 20 行前)添加以下内容
```
ARG PROXY=http://你电脑的 ip 地址:7890
ENV http_proxy=${PROXY}
ENV https_proxy=${PROXY}
```
4.3 重新 docker compose watch
5. 浏览器访问 http://127.0.0.1:1313
回到题目,构建的 html 文档可以 cp 出来,然后 phpstudy 或者 iis 运行起来。
6. `ctrl` + `c` 停止掉上述容器
7. docker compose up -d
8. docker ps -a 然后记住<容器 id>
9. docker cp <容器 id>/src/public ./public
10. 将 public 的目录放到 iis 或者 phpstudy 或者宝塔面板(搭建网站的环境)。
body007
190 天前
官方镜像解君愁:docker run -tid -p 4000:4000 docs/docker.github.io:latest
cwm1733023005
190 天前
(base) root@debian:/home/software/docker/docs# grep -r 'localhost:1313/' /home/software/docker/docs/ | head -10
/home/software/docker/docs/public/notary/running_a_service/index.html: <title>http://localhost:1313/engine/security/trust/</title>
/home/software/docker/docs/public/notary/running_a_service/index.html: <link rel="canonical" href="http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/running_a_service/index.html: <meta http-equiv="refresh" content="0; url=http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/getting_started/index.html: <title>http://localhost:1313/engine/security/trust/</title>
/home/software/docker/docs/public/notary/getting_started/index.html: <link rel="canonical" href="http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/getting_started/index.html: <meta http-equiv="refresh" content="0; url=http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/service_architecture/index.html: <title>http://localhost:1313/engine/security/trust/</title>
/home/software/docker/docs/public/notary/service_architecture/index.html: <link rel="canonical" href="http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/service_architecture/index.html: <meta http-equiv="refresh" content="0; url=http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/advanced_usage/index.html: <title>http://localhost:1313/engine/security/trust/</title>


不行啊,感觉 html 写死了。
cwm1733023005
190 天前
就要只能主机才能完整打开。
cwm1733023005
190 天前
@body007 谢谢还是这个大佬简单。
cwm1733023005
190 天前
@whitewash
(base) root@debian:/home/software/docker/docs# grep -r 'localhost:1313/' /home/software/docker/docs/ | head -10
/home/software/docker/docs/public/notary/running_a_service/index.html: <title>http://localhost:1313/engine/security/trust/</title>
/home/software/docker/docs/public/notary/running_a_service/index.html: <link rel="canonical" href="http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/running_a_service/index.html: <meta http-equiv="refresh" content="0; url=http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/getting_started/index.html: <title>http://localhost:1313/engine/security/trust/</title>
/home/software/docker/docs/public/notary/getting_started/index.html: <link rel="canonical" href="http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/getting_started/index.html: <meta http-equiv="refresh" content="0; url=http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/service_architecture/index.html: <title>http://localhost:1313/engine/security/trust/</title>
/home/software/docker/docs/public/notary/service_architecture/index.html: <link rel="canonical" href="http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/service_architecture/index.html: <meta http-equiv="refresh" content="0; url=http://localhost:1313/engine/security/trust/">
/home/software/docker/docs/public/notary/advanced_usage/index.html: <title>http://localhost:1313/engine/security/trust/</title>


不行啊,感觉 html 写死了。
julyclyde
189 天前
感觉你对修工具的兴趣似乎超过了干正事

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1050111

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX