arm 使用 ubuntu:23.10,docker build 失败,使用 --privileged 启动容器成功

arm 使用 ubuntu:23.10,docker build 失败,使用 --privileged 启动容器成功

构建映像基础ubuntu:23.10错误

W: GPG error: http://ports.ubuntu.com/ubuntu-ports mantic InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports mantic 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 mantic-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports mantic-updates 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 mantic-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports mantic-backports 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 mantic-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports mantic-security 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.
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

docker文件

FROM ubuntu:23.10
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update \
    && apt-get -y update  \
    && apt-get -y upgrade \
    && rm -fr /root/.cache/pip/wheels/* \
    && rm -fr /tmp/* \
    && apt-get clean \
    && apt-get autoclean \
    && apt-get autoremove

使用docker运行容器,出现同样的错误。

我尝试使用--privileged选项运行,可以。

相关内容