docker出现GPG error: At least one invalid signature was encountered 相关问题及解决方法

docker出现GPG error: At least one invalid signature was encountered 相关问题及解决方法。

W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/debian buster InRelease: At least one invalid signature was encountered.
E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/debian buster InRelease' is not signed.
W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease' is not signed.
W: GPG error: http://security.debian.org/debian-security buster/updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
ERROR: Service 'flake8' failed to build : The command '/bin/sh -c sed -i 
's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list  
   && apt-get update     && apt-get install tzdata cron libboost-dev libboost-python-dev  netcat -y   
     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/debian buster InRelease: At least one invalid signature was encountered.
E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/debian buster InRelease' is not signed.
W: GPG error: http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease' is not signed.
W: GPG error: http://security.debian.org/debian-security buster/updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
ERROR: Service 'autotest' failed to build : The command '/bin/sh -c sed -i 
's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list  
   && apt-get update     && apt-get install tzdata cron libboost-dev libboost-python-dev  netcat -y   
     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [248 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7906 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [7856 B]
Fetched 8401 kB in 4s (2021 kB/s)

解决方法:

docker image prune -a 
docker container prune -a
docker system prune
docker system df
之后再执行原来的命令。。。。

There are a few reasons why you encounter these errors:

There might be an issue with the existing cache and/or disc space. In order to fix it you need to clear the APT cache by executing: sudo apt-get clean and sudo apt-get update.

The same goes with existing docker images. Execute: docker image prune -f and docker container prune -f in order to remove unused data and free disc space.

If you don’t care about the security risks, you can try to run the apt-get command with the --allow-unauthenticated or --allow-insecure-repositories flag. According to the docs:

Ignore if packages can’t be authenticated and don’t prompt about it. This can be useful while working with local repositories, but is a huge security risk if data authenticity isn’t ensured in another way by the user itself.

Finally, on MacOS, where Docker runs inside a dedicated VM, you may need to increase the disk available to Docker from the Docker Desktop application (Settings -> Resources -> Advanced -> Disk image size).

对于出现 "Error response from daemon: driver failed programming external connectivity on endpoint" 错误的解决方法,你可以尝试以下几个步骤: 1. 检查端口冲突:请确保你要映射到容器内的端口没有与主机上的其他服务或容器发生冲突。可以通过运行 `docker ps` 命令查看已经运行的容器及其映射的端口,进一步确认是否存在端口冲突。 2. 重新启动 Docker 服务:有时候 Docker 守护进程可能会出现问题,导致网络连接失败。你可以尝试重启 Docker 服务,具体方法取决于你的操作系统。 - 在 Linux 上,可以使用 `sudo systemctl restart docker` 命令重启 Docker 服务。 - 在 macOS 上,可以在系统偏好设置中重启 Docker Desktop。 - 在 Windows 上,可以在任务栏右键点击 Docker 图标,选择 "Restart" 选项。 3. 检查网络配置:如果你使用的是自定义网络配置,确保网络设置正确。你可以尝试将容器连接到默认的桥接网络,看是否能够解决问题。 - 使用 `docker network ls` 命令查看当前存在的网络。 - 使用 `docker network inspect <network_name>` 命令查看特定网络的详细信息。 - 如果需要更改容器的网络连接,可以使用 `docker network connect` 或 `docker network disconnect` 命令。 4. 清理已停止的容器和无用的网络:如果已经存在大量的已停止的容器或无用的网络,可能会导致网络连接问题。你可以运行以下命令清理它们: - 清理已停止的容器:`docker container prune` - 清理无用的网络:`docker network prune` 5. 更新 Docker 版本:有时候,特定版本的 Docker 可能会存在一些已知的问题。尝试将 Docker 更新到最新版本,看是否解决问题。 这些是一些常见的解决方法,希望能够帮助你解决问题。如果问题仍然存在,请提供更多的错误信息和环境细节,以便我们能够给出更具体的建议。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

代码讲故事

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值