From 4881ccae085e97631c6324e9251eaca0f5cc4130 Mon Sep 17 00:00:00 2001 From: Pat Riehecky Date: Mon, 28 Aug 2017 11:59:38 -0500 Subject: [PATCH] man xz recommends -9 for larger than 32Mib --- imagefactory_plugins/Docker/Docker.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/imagefactory_plugins/Docker/Docker.py b/imagefactory_plugins/Docker/Docker.py index ef34a9b4..8fae57ee 100644 --- a/imagefactory_plugins/Docker/Docker.py +++ b/imagefactory_plugins/Docker/Docker.py @@ -42,7 +42,7 @@ class Docker(object): zope.interface.implements(CloudDelegate) - compress_commands = { "xz": "xz -T 0 --stdout %s > %s", + compress_commands = { "xz": "xz -9 -T 0 --stdout %s > %s", "gzip": "gzip -c %s > %s", "bzip2": "bzip2 -c %s > %s" } @@ -132,7 +132,7 @@ class Docker(object): "Domainname": "", "Image": "", "ExposedPorts": null - }}, + }}, "Config": null, "Id": "{idstring}", "Size": {size} @@ -377,7 +377,7 @@ def _run_guestmount(g): if wrap_metadata: # Get any parameters and if they are not set, create our defaults - # Docker image names should not have uppercase characters + # Docker image names should not have uppercase characters # https://fedorahosted.org/cloud/ticket/131 repository = parameters.get('repository',tdlobj.name).lower() tag = parameters.get('tag','latest') @@ -386,7 +386,7 @@ def _run_guestmount(g): env = parameters.get('docker_env', 'null') label = parameters.get('docker_label', 'null') rdict = { repository: { tag: docker_image_id } } - + dockerversion = parameters.get('dockerversion', '0.11.1') if not dockerversion in self.docker_templates_dict: raise Exception("No docker JSON template available for specified docker version (%s)" % (dockerversion)) @@ -408,7 +408,7 @@ def _run_guestmount(g): tdict['label'] = label tdict['size'] = size - image_json = docker_json_template.format(**tdict) + image_json = docker_json_template.format(**tdict) # v2 images # TODO: Something significantly less hacky looking.....