V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cwm1733023005
V2EX  ›  Docker

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

  •  
  •   cwm1733023005 · 159 天前 · 820 次点击
    这是一个创建于 159 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    9 条回复    2024-06-18 12:09:06 +08:00
    javalaw2010
        1
    javalaw2010  
       159 天前
    cwm1733023005
        2
    cwm1733023005  
    OP
       159 天前
    有构建 html 文件,教程吗
    whitewash
        3
    whitewash  
       159 天前
    @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 或者宝塔面板(搭建网站的环境)。
    body007
        4
    body007  
       159 天前
    官方镜像解君愁:docker run -tid -p 4000:4000 docs/docker.github.io:latest
    cwm1733023005
        5
    cwm1733023005  
    OP
       159 天前
    (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
        6
    cwm1733023005  
    OP
       159 天前
    就要只能主机才能完整打开。
    cwm1733023005
        7
    cwm1733023005  
    OP
       159 天前
    @body007 谢谢还是这个大佬简单。
    cwm1733023005
        8
    cwm1733023005  
    OP
       159 天前
    @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
        9
    julyclyde  
       158 天前
    感觉你对修工具的兴趣似乎超过了干正事
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1817 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 16:32 · PVG 00:32 · LAX 08:32 · JFK 11:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.