环境描述:
root@sriov-TaiShan-200:~# docker 版本 客户端:Docker 引擎 - 社区版本:20.10.17 服务器:Docker 引擎 - 社区引擎:版本:20.10.17 [root@e115d0727d6b /]# createrepo --version createrepo 0.9。 9
问题描述:
- 使用以下 Dockerfile 和命令构建 docker 镜像
docker run --rm -it test:test bash
FROM arm64v8/centos:7.9.2009
RUN curl http://mirrors.aliyun.com/repo/Centos-altarch-7.repo -o /etc/yum.repos.d/CentOS-Base.repo; yum update -y; yum install createrepo rpmdevtools -y;
RUN echo -e $'[local] \n\
name=Local Yum \n\
baseurl=file:///root/rpmbuild \n\
gpgcheck=0 \n\
enabled=1' > /etc/yum.repos.d/local.repo
RUN cd /root; rpmdev-setuptree; createrepo -v /root/rpmbuild
启动一个容器
docker run --rm -it test:test bash
运行下面的命令然后你会得到错误
[root@dd0710d5ea50 /]# createrepo -v --update /root/rpmbuild
Scanning old repo data
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Starting other db creation: Thu Jul 13 00:38:36 2023
Ending other db creation: Thu Jul 13 00:38:36 2023
Starting filelists db creation: Thu Jul 13 00:38:36 2023
Ending filelists db creation: Thu Jul 13 00:38:36 2023
Starting primary db creation: Thu Jul 13 00:38:36 2023
Ending primary db creation: Thu Jul 13 00:38:36 2023
Sqlite DBs complete
Error moving final /root/rpmbuild/repodata to old dir /root/rpmbuild/.olddata