zoukankan      html  css  js  c++  java
  • Mac docker构建镜像aptget update报GPG签名错误解决

    我正在使用python37作为基础镜像制作项目镜像,但构建过程中执行apt-get update时出现GPG签名错误

    本地操作系统为Mac OS,docker 环境为desktop for docker :

    Docker version 20.10.7, build f0df350

    错误详情:

    Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
      At least one invalid signature was encountered.
    Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
    Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
      At least one invalid signature was encountered.
    Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
      At least one invalid signature was encountered.
    Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
      At least one invalid signature was encountered.
    Reading package lists... Done
    W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
    E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
    E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.

    解决方案:

    docker image prune -a

    会清理一些镜像,然后再进行构建,就没有报错了

    参考文章:stackoverflow

     

     

     

    程序猿,要对自己狠一点!
  • 相关阅读:
    P6665 [清华集训2016] Alice 和 Bob 又在玩游戏
    模板库
    CSP-S2021 游记
    CSP-S2021 SD迷惑行为大赏
    博弈论总结
    LOJ6033「雅礼集训 2017 Day2」棋盘游戏(二分图最大匹配必经点)
    LOJ6065「2017 山东一轮集训 Day3」第一题
    LOJ6059「2017 山东一轮集训 Day1」Sum
    LOJ6102「2017 山东二轮集训 Day1」第三题
    python笔记:字符编码
  • 原文地址:https://www.cnblogs.com/dongxixi/p/15599413.html
Copyright © 2011-2022 走看看