From f49afa1b660576b2eb645c34ad91a012cb24eabd Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Fri, 2 Dec 2016 00:04:11 +0800 Subject: [PATCH] Add qemu-img into glance api image Change-Id: I564fd3cdd1c7e48657270510a195e397c7812817 Closes-Bug: #1646535 --- docker/glance/glance-api/Dockerfile.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker/glance/glance-api/Dockerfile.j2 b/docker/glance/glance-api/Dockerfile.j2 index 51693533d8..3528536946 100644 --- a/docker/glance/glance-api/Dockerfile.j2 +++ b/docker/glance/glance-api/Dockerfile.j2 @@ -3,6 +3,16 @@ MAINTAINER {{ maintainer }} {% block glance_api_header %}{% endblock %} +{% import "macros.j2" as macros with context %} + +{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %} + {% set glance_api_packages = ['qemu-img'] %} +{% elif base_distro in ['ubuntu'] %} + {% set glance_api_packages = ['qemu-utils'] %} +{% endif %} + +{{ macros.install_packages(glance_api_packages | customizable("packages")) }} + COPY extend_start.sh /usr/local/bin/kolla_glance_extend_start RUN chmod 755 /usr/local/bin/kolla_glance_extend_start