createrepo -v --update 폴더가 docker의 증분 빌드에서 실패함

createrepo -v --update 폴더가 docker의 증분 빌드에서 실패함

환경 설명:

root@sriov-TaiShan-200:~# docker 버전 클라이언트: Docker 엔진 - 커뮤니티 버전: 20.10.17 서버: Docker 엔진 - 커뮤니티 엔진: 버전: 20.10.17 [root@e115d0727d6b /]# createrepo --version createrepo 0.9 . 9

문제 설명:

  1. 다음 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
  1. 컨테이너 시작docker run --rm -it test:test bash

  2. 아래 명령을 실행하면 오류가 발생합니다

[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

관련 정보