Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man xz recommends -9 for larger than 32Mib #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions imagefactory_plugins/Docker/Docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down Expand Up @@ -132,7 +132,7 @@ class Docker(object):
"Domainname": "",
"Image": "",
"ExposedPorts": null
}},
}},
"Config": null,
"Id": "{idstring}",
"Size": {size}
Expand Down Expand Up @@ -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')
Expand All @@ -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))
Expand All @@ -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.....
Expand Down