From 3edcba1d55e25536911ac73e451bee9edde179e5 Mon Sep 17 00:00:00 2001 From: Don Penney Date: Wed, 14 Nov 2018 15:16:18 -0600 Subject: [PATCH] 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 --- centos_pike_docker_images.inc | 1 + virt/libvirt/centos/docker/Dockerfile | 43 +++++++++++++++++++ .../centos/stx-libvirt.pike_docker_image | 2 + 3 files changed, 46 insertions(+) create mode 100644 centos_pike_docker_images.inc create mode 100644 virt/libvirt/centos/docker/Dockerfile create mode 100644 virt/libvirt/centos/stx-libvirt.pike_docker_image diff --git a/centos_pike_docker_images.inc b/centos_pike_docker_images.inc new file mode 100644 index 000000000..aae003f96 --- /dev/null +++ b/centos_pike_docker_images.inc @@ -0,0 +1 @@ +virt/libvirt diff --git a/virt/libvirt/centos/docker/Dockerfile b/virt/libvirt/centos/docker/Dockerfile new file mode 100644 index 000000000..ec9deb044 --- /dev/null +++ b/virt/libvirt/centos/docker/Dockerfile @@ -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/* + diff --git a/virt/libvirt/centos/stx-libvirt.pike_docker_image b/virt/libvirt/centos/stx-libvirt.pike_docker_image new file mode 100644 index 000000000..85c8fefae --- /dev/null +++ b/virt/libvirt/centos/stx-libvirt.pike_docker_image @@ -0,0 +1,2 @@ +BUILDER=docker +LABEL=stx-libvirt