报错信息:
当编译完成dms-ui,dms模块后,执行make docker_rpm_with_dms命令出现如下报错:
unable to find image 'rpmbuild/centos7:latest' locally
latest: Pulling from rpmbuild/centos7
docKer: [DEPRECATION NOTICE] Docker Image format VI and Docker Image manifest vesion 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of docker.io/rpmbuild/centos7:latest to upgrade
the image to the 0CI Format or Docker Image manifest v2, schema 2. More informat
on at https://docs.docker.com/go/deprecated-image-specs/.
ee
'docker run --help'.
nake: *** [Makefile:159: docker rpm with dms] Error 125
原理分析:
该问题为在编译生成rpm包时需要使用到含有rpm-build软件包的centos7镜像。而这个镜像需要自己基于centos7进行制作。
问题解决:
#1.拉取centos7镜像
sudo docker pull centos:7
#2.启动镜像
sudo docker run -itd centos:7
#3.进入容器
sudo docker exec -it 容器ID /bin/bash
#4.在容器中安装rpm-build软件包
yum install rpm-build
#5.在新的命令行窗口将安装软件包的镜像打包
sudo docker commit -m 'add rpm-build' -a 'myeye' 容器ID rpmbuild/centos7:1.0.0
#6.修改sqle项目目录下的makefile文件55行
55 RPM_BUILD_IMAGE ?= rpmbuild/centos7:1.0.0
#7.重新执行编译命令即可打包得到rpm包
make docker_rpm_with_dms