我电脑经常离线,我想下载 docker 官方文档。
怎么下载,并运行成构建 html 文档。
2
cwm1733023005 OP 有构建 html 文件,教程吗
|
3
whitewash 149 天前
@cwm1733023005
我只是搬运工,+chatgpt 解决问题。 官方文档介绍了怎么构建。来源如下 https://github.com/docker/docs/blob/main/CONTRIBUTING.md 1. git clone [email protected]: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 或者宝塔面板(搭建网站的环境)。 |
4
body007 149 天前
官方镜像解君愁:docker run -tid -p 4000:4000 docs/docker.github.io:latest
|
5
cwm1733023005 OP (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 写死了。 |
6
cwm1733023005 OP 就要只能主机才能完整打开。
|
7
cwm1733023005 OP @body007 谢谢还是这个大佬简单。
|
8
cwm1733023005 OP @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 写死了。 |
9
julyclyde 148 天前
感觉你对修工具的兴趣似乎超过了干正事
|