# Copyright 2019 Nokia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Use newer than the CentOS stock diskimage-builder via "cloud" repo FROM centos:7.6.1810 RUN \ if [ "$(uname -m)" = aarch64 ]; then \ REPO_URI=http://mirror.centos.org/altarch/7/cloud/aarch64/openstack-queens/; \ EXTRA_RPM="gdisk dosfstools util-linux"; \ else \ REPO_URI=http://mirror.centos.org/centos/7/cloud/x86_64/openstack-queens/; \ fi && \ yum-config-manager --add-repo $REPO_URI && \ yum install --nogpgcheck -y \ git \ python \ python-pip \ wget \ which \ findutils \ systemd-udev \ parted \ sudo \ e2fsprogs \ xfsprogs \ qemu-img \ ${EXTRA_RPM:-} && \ pip install --upgrade pip==20.3.3 && \ pip install diskimage-builder==2.26.1 && \ pip install zipp && \ true && \ yum remove -y python-pip RUN find -name 99-selinux-fixfiles-restore -exec rm {} \; WORKDIR /work