dzdh
V2EX  ›  Docker

为什么同样的镜像, mac 上没问题, Linux 下就有问题

  •  
  •   dzdh · Oct 17, 2022 · 1770 views
    This topic created in 1312 days ago, the information mentioned may be changed or developed.

    镜像:registry.cn-hangzhou.aliyuncs.com/9527test/test:latest

    mac 下写个测试 file

    FROM xx
    
    RUN apt-get update
    

    没问题。

    同样的镜像,同样的 dockerfile ,linux 上就有问题。

    Get:1 http://mirrors.ustc.edu.cn/ubuntu jammy InRelease [270 kB]
    Get:2 http://mirrors.ustc.edu.cn/ubuntu jammy-updates InRelease [114 kB]
    Get:3 http://mirrors.ustc.edu.cn/ubuntu jammy-backports InRelease [99.8 kB]
    Get:4 http://mirrors.ustc.edu.cn/ubuntu jammy-security InRelease [110 kB]
    Get:5 https://launchpad.proxy.ustclug.org/ondrej/php/ubuntu jammy InRelease [23.9 kB]
    Err:1 http://mirrors.ustc.edu.cn/ubuntu jammy InRelease
      The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
    Err:2 http://mirrors.ustc.edu.cn/ubuntu jammy-updates InRelease
      The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
    

    macdocker Docker version 20.10.17 linuxdocker Docker version 20.10.2

    Supplement 1  ·  Oct 17, 2022
    升级 docker 后可破
    6 replies    2022-10-18 14:26:29 +08:00
    julyclyde
        1
    julyclyde  
       Oct 18, 2022
    那就很奇怪了
    难道 docker 把新版本的 apt key 注入到镜像内了?这可是入侵行为啊
    dzdh
        2
    dzdh  
    OP
       Oct 18, 2022
    @julyclyde 搜了一下。是说什么。ubuntu jammy 调用 aptkey 调用 syscalls 然后旧版的 docker 不支持
    julyclyde
        3
    julyclyde  
       Oct 18, 2022
    @dzdh 这功能还涉及 syscall ??你把搜到的网址发上来咱看看呗
    julyclyde
        5
    julyclyde  
       Oct 18, 2022
    @dzdh 看到里边提到了 seccomp
    我好像在某处也见过,有安装 docker 的时候也同时安装 seccomp 的做法
    要不你试试?
    dzdh
        6
    dzdh  
    OP
       Oct 18, 2022
    @julyclyde 已升级
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1172 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:19 · PVG 07:19 · LAX 16:19 · JFK 19:19
    ♥ Do have faith in what you're doing.