Create stx-integ docker image directives file

This update adds the docker image build directives file for
stx-libvirt and creates the centos_pike_docker_images.inc.

Change-Id: I72409f0f321b6c315a62e540e79e5d716eb023ed
Story: 2003907
Task: 26788
Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
Don Penney 2018-11-14 15:16:18 -06:00
parent fc06b965fd
commit 3edcba1d55
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1 @@
virt/libvirt

View File

@ -0,0 +1,43 @@
# Expected build arguments:
# BASE: specify base layer
# REPO_OPTS: yum options to enable StarlingX repo
#
ARG BASE
FROM ${BASE}
# Location of the STX repo config file, which will be parsed for enabling repos
ARG STX_REPO_FILE=/etc/yum.repos.d/stx.repo
ARG PROJECT=nova
ARG UID=42424
ARG GID=42424
RUN set -ex ;\
yum install --disablerepo=* \
$(grep '^name=' ${STX_REPO_FILE} | awk -F '=' '{printf "--enablerepo=" $2 " "}') \
-y \
ceph-common \
dmidecode \
ebtables \
iproute \
libvirt \
pm-utils \
qemu \
qemu-block-extra \
qemu-efi \
qemu-kvm-ev \
qemu-kvm-tools-ev \
perl-Error \
perl-Data-Dumper \
perl-TermReadKey \
openvswitch ;\
groupadd -g ${GID} ${PROJECT} ;\
useradd -u ${UID} -g ${PROJECT} -M -d /var/lib/${PROJECT} -s /usr/sbin/nologin -c "${PROJECT} user" ${PROJECT} ;\
mkdir -p /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} ;\
chown ${PROJECT}:${PROJECT} /etc/${PROJECT} /var/log/${PROJECT} /var/lib/${PROJECT} /var/cache/${PROJECT} ;\
usermod -a -G kvm ${PROJECT} ;\
rm -rf \
/var/log/* \
/tmp/* \
/var/tmp/*

View File

@ -0,0 +1,2 @@
BUILDER=docker
LABEL=stx-libvirt