V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ling516
V2EX  ›  Docker

docker 容器里面没有 yum 运行脚本要安装两个包 怎么办

  •  
  •   ling516 · Dec 30, 2021 · 2005 views
    This topic created in 1586 days ago, the information mentioned may be changed or developed.

    容器可以用 apt-get,但是无法 update

    12 replies    2021-12-30 10:18:46 +08:00
    Privileges
        1
    Privileges  
       Dec 30, 2021 via Android
    有 apt-get 命令怎么可能执行不了 update 。。很难想象
    seanzxx
        2
    seanzxx  
       Dec 30, 2021
    有什么错误信息吗?
    clf
        3
    clf  
       Dec 30, 2021
    一般我是直接下二进制包复制到容器里配置环境变量的。

    具体问题的排查,建议你把 docker 的基础镜像发一下?
    mason961125
        4
    mason961125  
       Dec 30, 2021 via Android
    ?为什么不自己打包镜像?
    ling516
        5
    ling516  
    OP
       Dec 30, 2021
    ling516
        6
    ling516  
    OP
       Dec 30, 2021
    @mason961125 就是自己打包呀 打包过程中错误
    ling516
        7
    ling516  
    OP
       Dec 30, 2021
    @seanzxx
    apt-get update 命令输出

    W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
    W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Could not connect to 192.168.101.1:80 (192.168.101.1). - connect (111: Connection refused)
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    ling516
        8
    ling516  
    OP
       Dec 30, 2021
    @Privileges 解决了 换了国内源
    ling516
        9
    ling516  
    OP
       Dec 30, 2021
    @seanzxx 解决了 换了国内源
    ling516
        10
    ling516  
    OP
       Dec 30, 2021
    @clf 解决了 换了国内源
    ling516
        11
    ling516  
    OP
       Dec 30, 2021
    @mason961125 解决了 换了国内源
    killva4624
        12
    killva4624  
       Dec 30, 2021
    看到标题和内容我是有点懵的,建议楼主先去详细了解 yum 和 apt-get 的本质区别……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2478 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 07:16 · PVG 15:16 · LAX 00:16 · JFK 03:16
    ♥ Do have faith in what you're doing.