Closed flyinbedxyz closed 1 year ago
我刚测试docker build是正常的,你尝试清除一下docker的缓存看有没有效果。可以先试试docker builder prune命令。
我也出现了这样的问题,想问问最后怎么处理的呀?
真相了,Docker version 20.10.9以及以下版本使用ubuntu:22.04这个镜像会有问题 解决办法可参考https://blog.csdn.net/this_is_id/article/details/131956526
2.9.3版本 Building web Sending build context to Docker daemon 535.8MB
Step 1/8 : FROM ubuntu:22.04 ---> 99284ca6cea0 Step 2/8 : ENV LC_ALL C.UTF-8 ---> Using cache ---> b4405cbf3a7e Step 3/8 : ENV TZ=Asia/Shanghai DEBIAN_FRONTEND=noninteractive ---> Using cache ---> 6d3507115ab0 Step 4/8 : RUN set -x && sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && apt update && apt install -y tzdata && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata && rm -rf /var/lib/apt/lists/* ---> Running in aca750bc3602
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://mirrors.ustc.edu.cn/ubuntu jammy InRelease [270 kB] Get:2 http://mirrors.ustc.edu.cn/ubuntu jammy-updates InRelease [119 kB] Get:3 http://mirrors.ustc.edu.cn/ubuntu jammy-backports InRelease [108 kB] Get:4 http://mirrors.ustc.edu.cn/ubuntu jammy-security InRelease [110 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 Err:3 http://mirrors.ustc.edu.cn/ubuntu jammy-backports InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C Err:4 http://mirrors.ustc.edu.cn/ubuntu jammy-security InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C Reading package lists... W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: GPG error: 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 E: The repository 'http://mirrors.ustc.edu.cn/ubuntu jammy InRelease' is not signed. W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: GPG error: 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 E: The repository 'http://mirrors.ustc.edu.cn/ubuntu jammy-updates InRelease' is not signed. W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy-backports/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy-backports/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: GPG error: http://mirrors.ustc.edu.cn/ubuntu jammy-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C E: The repository 'http://mirrors.ustc.edu.cn/ubuntu jammy-backports InRelease' is not signed. W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://mirrors.ustc.edu.cn/ubuntu/dists/jammy-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: GPG error: http://mirrors.ustc.edu.cn/ubuntu jammy-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C E: The repository 'http://mirrors.ustc.edu.cn/ubuntu jammy-security InRelease' is not signed. E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/.deb /var/cache/apt/archives/partial/.deb /var/cache/apt/.bin || true' E: Sub-process returned an error code The command '/bin/sh -c set -x && sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && apt update && apt install -y tzdata && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata && rm -rf /var/lib/apt/lists/' returned a non-zero code: 100 ERROR: Service 'web' failed to build