release: Pass the qemu tarball name as a docker build arg

Rather than hardcoding the tarball name to be generated in the
Dockerfile, pass this as an argument.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde 2019-11-13 16:59:17 -08:00
parent 78959588f7
commit e6c2a53953
4 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ from ubuntu:18.04
ARG QEMU_VIRTIOFS_REPO
# commit/tag/branch
ARG QEMU_VIRTIOFS_TAG
ARG QEMU_TARBALL
ARG PREFIX
WORKDIR /root/qemu-virtiofs
@ -49,4 +50,4 @@ RUN make -j$(nproc) virtiofsd
RUN make install DESTDIR=/tmp/qemu-virtiofs-static
RUN mv /tmp/qemu-virtiofs-static/"${PREFIX}"/bin/qemu-system-x86_64 /tmp/qemu-virtiofs-static/"${PREFIX}"/bin/qemu-virtiofs-system-x86_64
RUN chmod +x virtiofsd && mv virtiofsd /tmp/qemu-virtiofs-static/opt/kata/bin/
RUN cd /tmp/qemu-virtiofs-static && tar -czvf kata-qemu-static.tar.gz *
RUN cd /tmp/qemu-virtiofs-static && tar -czvf "${QEMU_TARBALL}" *

View File

@ -32,6 +32,7 @@ sudo docker build \
--build-arg https_proxy="${https_proxy}" \
--build-arg QEMU_VIRTIOFS_REPO="${qemu_virtiofs_repo}" \
--build-arg QEMU_VIRTIOFS_TAG="${qemu_virtiofs_tag}" \
--build-arg QEMU_TARBALL="${qemu_virtiofs_tar}" \
--build-arg PREFIX="${prefix}" \
"${packaging_dir}" \
-f "${script_dir}/Dockerfile" \

View File

@ -3,6 +3,7 @@ from ubuntu:18.04
ARG QEMU_REPO
# commit/tag/branch
ARG QEMU_VERSION
ARG QEMU_TARBALL
ARG PREFIX
WORKDIR /root/qemu
@ -54,4 +55,4 @@ RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./conf
RUN make -j$(nproc)
RUN make install DESTDIR=/tmp/qemu-static
RUN cd /tmp/qemu-static && tar -czvf kata-qemu-static.tar.gz *
RUN cd /tmp/qemu-static && tar -czvf "${QEMU_TARBALL}" *

View File

@ -46,6 +46,7 @@ sudo docker build \
--build-arg https_proxy="${https_proxy}" \
--build-arg QEMU_REPO="${qemu_repo}" \
--build-arg QEMU_VERSION="${qemu_version}" \
--build-arg QEMU_TARBALL="${qemu_tar}" \
--build-arg PREFIX="${prefix}" \
"${packaging_dir}" \
-f "${script_dir}/Dockerfile" \