cwm1733023005
V2EX  ›  Docker

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

  •  
  •   cwm1733023005 · Jun 17, 2024 · 1542 views
    This topic created in 757 days ago, the information mentioned may be changed or developed.

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

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

    9 replies    2024-06-18 12:09:06 +08:00
    javalaw2010
        1
    javalaw2010  
       Jun 17, 2024
    cwm1733023005
        2
    cwm1733023005  
    OP
       Jun 17, 2024
    有构建 html 文件,教程吗
    whitewash
        3
    whitewash  
       Jun 17, 2024
    @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  
       Jun 17, 2024
    官方镜像解君愁:docker run -tid -p 4000:4000 docs/docker.github.io:latest
    cwm1733023005
        5
    cwm1733023005  
    OP
       Jun 17, 2024
    (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
       Jun 17, 2024
    就要只能主机才能完整打开。
    cwm1733023005
        7
    cwm1733023005  
    OP
       Jun 17, 2024
    @body007 谢谢还是这个大佬简单。
    cwm1733023005
        8
    cwm1733023005  
    OP
       Jun 17, 2024
    @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  
       Jun 18, 2024
    感觉你对修工具的兴趣似乎超过了干正事
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   945 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 20:46 · PVG 04:46 · LAX 13:46 · JFK 16:46
    ♥ Do have faith in what you're doing.