diff --git a/cekit/builders/docker_builder.py b/cekit/builders/docker_builder.py
index 74347bf..5ac381d 100644
--- a/cekit/builders/docker_builder.py
+++ b/cekit/builders/docker_builder.py
@@ -86,32 +86,41 @@ class DockerBuilder(Builder):
         docker_args['path'] = os.path.join(self.target, 'image')
         docker_args['pull'] = self.params.pull
         docker_args['rm'] = True
+        docker_args['decode'] = True
 
-        build_log = [""]
+        build_log = []
         docker_layer_ids = []
 
         try:
-            out = docker_client.build(**docker_args)
-            for line in out:
-                if b'stream' in line:
-                    line = yaml.safe_load(line)['stream']
-                elif b'status' in line:
-                    line = yaml.safe_load(line)['status']
-                elif b'errorDetail' in line:
-                    line = yaml.safe_load(line)['errorDetail']['message']
-                    raise CekitError("Image build failed: '%s'" % line)
-
-                if line != build_log[-1]:
-                    # this prevents poluting cekit log with dowloading/extracting msgs
-                    log_msg = ANSI_ESCAPE.sub('', line).strip()
-                    for msg in log_msg.split('\n'):
-                        LOGGER.info('Docker: %s' % msg)
-                    build_log.append(line)
-
-                    layer_id_match = re.search(r'^---> ([\w]{12})$', line.strip())
-
-                    if layer_id_match:
-                        docker_layer_ids.append(layer_id_match.group(1))
+            stream = docker_client.build(**docker_args)
+
+            for part in stream:
+                # In case an error is returned, log the message and fail the build
+                if 'errorDetail' in part:
+                    message = part.get('errorDetail', {}).get('message', '')
+                    raise CekitError("Image build failed: '{}'".format(message))
+
+                if 'stream' in part:
+                    messages = part['stream']
+                else:
+                    # We actually expect only 'stream' here
+                    # If there is something different, we log it but do not
+                    # do anything special about it
+                    LOGGER.debug("Docker: {}".format(part))
+                    continue
+
+                # This prevents poluting CEKit log with dowloading/extracting msgs
+                messages = ANSI_ESCAPE.sub('', messages).strip()
+
+                for message in messages.split('\n'):
+                    LOGGER.info('Docker: {}'.format(message))
+
+                build_log.append(messages)
+
+                layer_id_match = re.search(r'^---> ([\w]{12})$', messages)
+
+                if layer_id_match:
+                    docker_layer_ids.append(layer_id_match.group(1))
 
         except requests.ConnectionError as ex:
             exception_chain = traceback.format_exc()
@@ -119,8 +128,8 @@ class DockerBuilder(Builder):
 
             if 'PermissionError' in exception_chain:
                 message = "Unable to contact docker daemon. Is it correctly setup?\n" \
-                          "See https://developer.fedoraproject.org/tools/docker/docker-installation.html and " \
-                          "http://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-run-docker-in-centos-fedora-or-rhel"
+                    "See https://developer.fedoraproject.org/tools/docker/docker-installation.html and " \
+                    "http://www.projectatomic.io/blog/2015/08/why-we-dont-let-non-root-users-run-docker-in-centos-fedora-or-rhel"
             elif 'FileNotFoundError' in exception_chain:
                 message = "Unable to contact docker daemon. Is it started?"
             else:
@@ -138,13 +147,13 @@ class DockerBuilder(Builder):
             msg = "Image build failed, see logs above."
             if len(docker_layer_ids) >= 2:
                 LOGGER.error("You can look inside the failed image by running "
-                             "'docker run --rm -ti %s bash'" % docker_layer_ids[-1])
+                             "'docker run --rm -ti {} bash'".format(docker_layer_ids[-1]))
             if "To enable Red Hat Subscription Management repositories:" in ' '.join(build_log) and \
                     not os.path.exists(os.path.join(self.target, 'image', 'repos')):
                 msg = "Image build failed with a yum error and you don't " \
-                      "have any yum repository configured, please check " \
-                      "your image/module descriptor for proper repository " \
-                      " definitions."
+                    "have any yum repository configured, please check " \
+                    "your image/module descriptor for proper repository " \
+                    " definitions."
             raise CekitError(msg, ex)
 
         return docker_layer_ids[-1]

Can't build docker image using MacOSX
**Describe the bug**
The failure occurs during docker build phase. Seems an issue in the way docker output is formatted.

During cekit build docker I am getting:

2019-05-22 11:15:56,272 cekit        ERROR    ('Image build failed, see logs above.', ParserError())
CekitError: ('Image build failed, see logs above.', ParserError())

**To reproduce**
git clone -b wf-17 http://github.com/jfdenise/wildfly-s2i
cd wildFly-s2i/wildfly-runtime-image
cekit build docker

**Expected behavior**
Expect the image to be built.

**Logs**
```
(cekit) MacBook-Pro-de-Jean-Francois:wildfly-runtime-image jfdenise$ cekit --verbose build docker
2019-05-22 11:15:34,060 cekit        DEBUG    Running version 3.0.1
2019-05-22 11:15:34,060 cekit        DEBUG    Configuring CEKit...
2019-05-22 11:15:34,061 cekit        DEBUG    Removing dirty directory: 'target/image/modules'
2019-05-22 11:15:34,072 cekit        DEBUG    Removing dirty directory: 'target/repo'
2019-05-22 11:15:34,146 cekit        WARNING  You are running CEKit on an unknown platform. External dependencies suggestions may not work!
2019-05-22 11:15:34,146 cekit        DEBUG    Checking CEKit core dependencies...
2019-05-22 11:15:34,147 cekit        DEBUG    Checking if 'git' dependency is provided...
2019-05-22 11:15:34,147 cekit        DEBUG    CEKit dependency 'git' provided via the '/usr/bin/git' executable.
2019-05-22 11:15:34,147 cekit        DEBUG    All dependencies provided!
2019-05-22 11:15:34,245 cekit        INFO     Generating files for docker engine
2019-05-22 11:15:34,245 cekit        INFO     Initializing image descriptor...
2019-05-22 11:15:34,246 cekit        DEBUG    Checking CEKit generate dependencies...
2019-05-22 11:15:34,246 cekit        DEBUG    No dependencies found, skipping...
2019-05-22 11:15:34,246 cekit        DEBUG    Reading descriptor from 'image.yaml' file...
2019-05-22 11:15:34,278 cekit        DEBUG    Downloading module repository: 'cct_module'
2019-05-22 11:15:34,278 cekit        INFO     Preparing resource 'cct_module'
2019-05-22 11:15:34,278 cekit        DEBUG    Running 'git clone --depth 1 https://github.com/jboss-openshift/cct_module.git target/repo/cct_module.git-master -b master'
2019-05-22 11:15:37,211 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/openshift-passwd/module.yaml' file...
2019-05-22 11:15:37,217 cekit        DEBUG    Adding module 'openshift-passwd', path: 'target/repo/cct_module.git-master/openshift-passwd'
2019-05-22 11:15:37,218 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-partition/module.yaml' file...
2019-05-22 11:15:37,222 cekit        DEBUG    Adding module 'os-partition', path: 'target/repo/cct_module.git-master/os-partition'
2019-05-22 11:15:37,223 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-java-run/module.yaml' file...
2019-05-22 11:15:37,230 cekit        DEBUG    Adding module 'os-java-run', path: 'target/repo/cct_module.git-master/os-java-run'
2019-05-22 11:15:37,230 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/keycloak-layer/module.yaml' file...
2019-05-22 11:15:37,235 cekit        DEBUG    Adding module 'keycloak-layer', path: 'target/repo/cct_module.git-master/keycloak-layer'
2019-05-22 11:15:37,236 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-secure-mgmt-console/module.yaml' file...
2019-05-22 11:15:37,240 cekit        DEBUG    Adding module 'os-jws-secure-mgmt-console', path: 'target/repo/cct_module.git-master/os-jws-secure-mgmt-console'
2019-05-22 11:15:37,242 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-java-hawkular/module.yaml' file...
2019-05-22 11:15:37,247 cekit        DEBUG    Adding module 'os-java-hawkular', path: 'target/repo/cct_module.git-master/os-java-hawkular'
2019-05-22 11:15:37,248 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-jolokia/module.yaml' file...
2019-05-22 11:15:37,252 cekit        DEBUG    Adding module 'os-jws-jolokia', path: 'target/repo/cct_module.git-master/os-jws-jolokia'
2019-05-22 11:15:37,253 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/products/sso71/module.yaml' file...
2019-05-22 11:15:37,261 cekit        DEBUG    Adding module 'product.sso71', path: 'target/repo/cct_module.git-master/products/sso71'
2019-05-22 11:15:37,262 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/products/datavirt6x/module.yaml' file...
2019-05-22 11:15:37,269 cekit        DEBUG    Adding module 'product.datavirt6x', path: 'target/repo/cct_module.git-master/products/datavirt6x'
2019-05-22 11:15:37,270 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/products/kieserver6x/module.yaml' file...
2019-05-22 11:15:37,279 cekit        DEBUG    Adding module 'product.kieserver6x', path: 'target/repo/cct_module.git-master/products/kieserver6x'
2019-05-22 11:15:37,279 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/s2i-common/module.yaml' file...
2019-05-22 11:15:37,284 cekit        DEBUG    Adding module 's2i-common', path: 'target/repo/cct_module.git-master/s2i-common'
2019-05-22 11:15:37,285 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-rm-defaults/module.yaml' file...
2019-05-22 11:15:37,289 cekit        DEBUG    Adding module 'os-jws-rm-defaults', path: 'target/repo/cct_module.git-master/os-jws-rm-defaults'
2019-05-22 11:15:37,290 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-rm-root/module.yaml' file...
2019-05-22 11:15:37,295 cekit        DEBUG    Adding module 'os-jws-rm-root', path: 'target/repo/cct_module.git-master/os-jws-rm-root'
2019-05-22 11:15:37,296 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/jws/s2i/bash/module.yaml' file...
2019-05-22 11:15:37,304 cekit        DEBUG    Adding module 'jboss.container.jws.s2i.bash', path: 'target/repo/cct_module.git-master/jboss/container/jws/s2i/bash'
2019-05-22 11:15:37,305 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/proxy/api/module.yaml' file...
2019-05-22 11:15:37,321 cekit        DEBUG    Adding module 'jboss.container.proxy.api', path: 'target/repo/cct_module.git-master/jboss/container/proxy/api'
2019-05-22 11:15:37,322 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/util/logging/bash/module.yaml' file...
2019-05-22 11:15:37,330 cekit        DEBUG    Adding module 'jboss.container.util.logging.bash', path: 'target/repo/cct_module.git-master/jboss/container/util/logging/bash'
2019-05-22 11:15:37,331 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/maven/35/default/module.yaml' file...
2019-05-22 11:15:37,342 cekit        DEBUG    Adding module 'jboss.container.maven.35.bash', path: 'target/repo/cct_module.git-master/jboss/container/maven/35/default'
2019-05-22 11:15:37,343 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/maven/35/35scl/module.yaml' file...
2019-05-22 11:15:37,351 cekit        DEBUG    Adding module 'jboss.container.maven.35.bash', path: 'target/repo/cct_module.git-master/jboss/container/maven/35/35scl'
2019-05-22 11:15:37,352 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/maven/default/bash/module.yaml' file...
2019-05-22 11:15:37,363 cekit        DEBUG    Adding module 'jboss.container.maven.default.bash', path: 'target/repo/cct_module.git-master/jboss/container/maven/default/bash'
2019-05-22 11:15:37,364 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/maven/s2i/bash/module.yaml' file...
2019-05-22 11:15:37,372 cekit        DEBUG    Adding module 'jboss.container.maven.s2i.bash', path: 'target/repo/cct_module.git-master/jboss/container/maven/s2i/bash'
2019-05-22 11:15:37,374 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/maven/s2i/api/module.yaml' file...
2019-05-22 11:15:37,382 cekit        DEBUG    Adding module 'jboss.container.maven.s2i.api', path: 'target/repo/cct_module.git-master/jboss/container/maven/s2i/api'
2019-05-22 11:15:37,383 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/maven/api/module.yaml' file...
2019-05-22 11:15:37,430 cekit        DEBUG    Adding module 'jboss.container.maven.api', path: 'target/repo/cct_module.git-master/jboss/container/maven/api'
2019-05-22 11:15:37,431 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/java/proxy/bash/module.yaml' file...
2019-05-22 11:15:37,439 cekit        DEBUG    Adding module 'jboss.container.java.proxy.bash', path: 'target/repo/cct_module.git-master/jboss/container/java/proxy/bash'
2019-05-22 11:15:37,441 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/java/jvm/bash/module.yaml' file...
2019-05-22 11:15:37,448 cekit        DEBUG    Adding module 'jboss.container.java.jvm.bash', path: 'target/repo/cct_module.git-master/jboss/container/java/jvm/bash'
2019-05-22 11:15:37,449 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/java/jvm/api/module.yaml' file...
2019-05-22 11:15:37,480 cekit        DEBUG    Adding module 'jboss.container.java.jvm.api', path: 'target/repo/cct_module.git-master/jboss/container/java/jvm/api'
2019-05-22 11:15:37,481 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/java/s2i/bash/module.yaml' file...
2019-05-22 11:15:37,495 cekit        DEBUG    Adding module 'jboss.container.java.s2i.bash', path: 'target/repo/cct_module.git-master/jboss/container/java/s2i/bash'
2019-05-22 11:15:37,497 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/java/run/bash/module.yaml' file...
2019-05-22 11:15:37,521 cekit        DEBUG    Adding module 'jboss.container.java.run.bash', path: 'target/repo/cct_module.git-master/jboss/container/java/run/bash'
2019-05-22 11:15:37,522 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/user/module.yaml' file...
2019-05-22 11:15:37,530 cekit        DEBUG    Adding module 'jboss.container.user', path: 'target/repo/cct_module.git-master/jboss/container/user'
2019-05-22 11:15:37,531 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/s2i/core/bash/module.yaml' file...
2019-05-22 11:15:37,539 cekit        DEBUG    Adding module 'jboss.container.s2i.core.bash', path: 'target/repo/cct_module.git-master/jboss/container/s2i/core/bash'
2019-05-22 11:15:37,541 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/s2i/core/api/module.yaml' file...
2019-05-22 11:15:37,574 cekit        DEBUG    Adding module 'jboss.container.s2i.core.api', path: 'target/repo/cct_module.git-master/jboss/container/s2i/core/api'
2019-05-22 11:15:37,575 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/jolokia/bash/module.yaml' file...
2019-05-22 11:15:37,600 cekit        DEBUG    Adding module 'jboss.container.jolokia.bash', path: 'target/repo/cct_module.git-master/jboss/container/jolokia/bash'
2019-05-22 11:15:37,601 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/jolokia/api/module.yaml' file...
2019-05-22 11:15:37,629 cekit        DEBUG    Adding module 'jboss.container.jolokia.api', path: 'target/repo/cct_module.git-master/jboss/container/jolokia/api'
2019-05-22 11:15:37,630 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/openjdk/jdk/11/module.yaml' file...
2019-05-22 11:15:37,642 cekit        DEBUG    Adding module 'jboss.container.openjdk.jdk', path: 'target/repo/cct_module.git-master/jboss/container/openjdk/jdk/11'
2019-05-22 11:15:37,644 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/openjdk/jdk/10/module.yaml' file...
2019-05-22 11:15:37,657 cekit        DEBUG    Adding module 'jboss.container.openjdk.jdk', path: 'target/repo/cct_module.git-master/jboss/container/openjdk/jdk/10'
2019-05-22 11:15:37,658 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/openjdk/jdk/8/module.yaml' file...
2019-05-22 11:15:37,672 cekit        DEBUG    Adding module 'jboss.container.openjdk.jdk', path: 'target/repo/cct_module.git-master/jboss/container/openjdk/jdk/8'
2019-05-22 11:15:37,674 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/openjdk/base/module.yaml' file...
2019-05-22 11:15:37,679 cekit        DEBUG    Adding module 'jboss.container.openjdk.base', path: 'target/repo/cct_module.git-master/jboss/container/openjdk/base'
2019-05-22 11:15:37,680 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/hawkular/bash/module.yaml' file...
2019-05-22 11:15:37,697 cekit        DEBUG    Adding module 'jboss.container.hawkular.bash', path: 'target/repo/cct_module.git-master/jboss/container/hawkular/bash'
2019-05-22 11:15:37,699 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/hawkular/api/module.yaml' file...
2019-05-22 11:15:37,723 cekit        DEBUG    Adding module 'jboss.container.hawkular.api', path: 'target/repo/cct_module.git-master/jboss/container/hawkular/api'
2019-05-22 11:15:37,724 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/prometheus/bash/module.yaml' file...
2019-05-22 11:15:37,746 cekit        DEBUG    Adding module 'jboss.container.prometheus.bash', path: 'target/repo/cct_module.git-master/jboss/container/prometheus/bash'
2019-05-22 11:15:37,748 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss/container/prometheus/api/module.yaml' file...
2019-05-22 11:15:37,756 cekit        DEBUG    Adding module 'jboss.container.prometheus.api', path: 'target/repo/cct_module.git-master/jboss/container/prometheus/api'
2019-05-22 11:15:37,756 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-db-drivers/module.yaml' file...
2019-05-22 11:15:37,760 cekit        DEBUG    Adding module 'os-jws-db-drivers', path: 'target/repo/cct_module.git-master/os-jws-db-drivers'
2019-05-22 11:15:37,761 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/openshift-layer/module.yaml' file...
2019-05-22 11:15:37,766 cekit        DEBUG    Adding module 'openshift-layer', path: 'target/repo/cct_module.git-master/openshift-layer'
2019-05-22 11:15:37,767 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-java-jolokia/module.yaml' file...
2019-05-22 11:15:37,772 cekit        DEBUG    Adding module 'os-java-jolokia', path: 'target/repo/cct_module.git-master/os-java-jolokia'
2019-05-22 11:15:37,773 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-chmod/module.yaml' file...
2019-05-22 11:15:37,778 cekit        DEBUG    Adding module 'os-jws-chmod', path: 'target/repo/cct_module.git-master/os-jws-chmod'
2019-05-22 11:15:37,779 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-java-misc/module.yaml' file...
2019-05-22 11:15:37,785 cekit        DEBUG    Adding module 'os-java-misc', path: 'target/repo/cct_module.git-master/os-java-misc'
2019-05-22 11:15:37,785 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jboss-maven/module.yaml' file...
2019-05-22 11:15:37,790 cekit        DEBUG    Adding module 'jboss-maven', path: 'target/repo/cct_module.git-master/jboss-maven'
2019-05-22 11:15:37,790 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-logging/module.yaml' file...
2019-05-22 11:15:37,794 cekit        DEBUG    Adding module 'os-logging', path: 'target/repo/cct_module.git-master/os-logging'
2019-05-22 11:15:37,796 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws7-conffiles/module.yaml' file...
2019-05-22 11:15:37,800 cekit        DEBUG    Adding module 'os-jws7-conffiles', path: 'target/repo/cct_module.git-master/os-jws7-conffiles'
2019-05-22 11:15:37,801 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-sso72/module.yaml' file...
2019-05-22 11:15:37,811 cekit        DEBUG    Adding module 'os-sso72', path: 'target/repo/cct_module.git-master/os-sso72'
2019-05-22 11:15:37,812 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/jolokia/module.yaml' file...
2019-05-22 11:15:37,817 cekit        DEBUG    Adding module 'jolokia', path: 'target/repo/cct_module.git-master/jolokia'
2019-05-22 11:15:37,817 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-logging/module.yaml' file...
2019-05-22 11:15:37,846 cekit        DEBUG    Adding module 'os-jws-logging', path: 'target/repo/cct_module.git-master/os-jws-logging'
2019-05-22 11:15:37,847 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-s2i/module.yaml' file...
2019-05-22 11:15:37,850 cekit        DEBUG    Adding module 'os-jws-s2i', path: 'target/repo/cct_module.git-master/os-jws-s2i'
2019-05-22 11:15:37,850 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-deployments/module.yaml' file...
2019-05-22 11:15:37,854 cekit        DEBUG    Adding module 'os-jws-deployments', path: 'target/repo/cct_module.git-master/os-jws-deployments'
2019-05-22 11:15:37,855 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-https/module.yaml' file...
2019-05-22 11:15:37,859 cekit        DEBUG    Adding module 'os-jws-https', path: 'target/repo/cct_module.git-master/os-jws-https'
2019-05-22 11:15:37,860 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-java-s2i/module.yaml' file...
2019-05-22 11:15:37,863 cekit        DEBUG    Adding module 'os-java-s2i', path: 'target/repo/cct_module.git-master/os-java-s2i'
2019-05-22 11:15:37,864 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-sso/module.yaml' file...
2019-05-22 11:15:37,868 cekit        DEBUG    Adding module 'os-sso', path: 'target/repo/cct_module.git-master/os-sso'
2019-05-22 11:15:37,870 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-sso71/module.yaml' file...
2019-05-22 11:15:37,876 cekit        DEBUG    Adding module 'os-sso71', path: 'target/repo/cct_module.git-master/os-sso71'
2019-05-22 11:15:37,876 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/dynamic-resources/module.yaml' file...
2019-05-22 11:15:37,881 cekit        DEBUG    Adding module 'dynamic-resources', path: 'target/repo/cct_module.git-master/dynamic-resources'
2019-05-22 11:15:37,881 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws-launch/module.yaml' file...
2019-05-22 11:15:37,886 cekit        DEBUG    Adding module 'os-jws-launch', path: 'target/repo/cct_module.git-master/os-jws-launch'
2019-05-22 11:15:37,887 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/java-alternatives/module.yaml' file...
2019-05-22 11:15:37,890 cekit        DEBUG    Adding module 'java-alternatives', path: 'target/repo/cct_module.git-master/java-alternatives'
2019-05-22 11:15:37,890 cekit        DEBUG    Reading descriptor from '/Users/jfdenise/workspaces/wildfly-s2i/wildfly-runtime-image/target/repo/cct_module.git-master/os-jws8-conffiles/module.yaml' file...
2019-05-22 11:15:37,894 cekit        DEBUG    Adding module 'os-jws8-conffiles', path: 'target/repo/cct_module.git-master/os-jws8-conffiles'
2019-05-22 11:15:37,894 cekit        DEBUG    Preparing module 'jboss.container.openjdk.jdk' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,895 cekit        DEBUG    Preparing module 'jboss.container.user' required by 'jboss.container.openjdk.jdk'.
2019-05-22 11:15:37,895 cekit        DEBUG    Preparing module 'dynamic-resources' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,896 cekit        DEBUG    Preparing module 'os-java-run' required by 'dynamic-resources'.
2019-05-22 11:15:37,896 cekit        DEBUG    Preparing module 'jboss.container.java.jvm.bash' required by 'os-java-run'.
2019-05-22 11:15:37,897 cekit        DEBUG    Preparing module 'jboss.container.java.jvm.api' required by 'jboss.container.java.jvm.bash'.
2019-05-22 11:15:37,897 cekit        DEBUG    Preparing module 'jboss.container.java.proxy.bash' required by 'jboss.container.java.jvm.bash'.
2019-05-22 11:15:37,898 cekit        DEBUG    Preparing module 'jboss.container.proxy.api' required by 'jboss.container.java.proxy.bash'.
2019-05-22 11:15:37,898 cekit        DEBUG    Preparing module 'jboss.container.jolokia.bash' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,899 cekit        DEBUG    Preparing module 'jboss.container.jolokia.api' required by 'jboss.container.jolokia.bash'.
2019-05-22 11:15:37,900 cekit        DEBUG    Copying module 'jboss.container.user' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,900 cekit        DEBUG    Copying module 'jboss.container.user' to: 'target/image/modules/jboss.container.user'
2019-05-22 11:15:37,906 cekit        DEBUG    Copying module 'jboss.container.openjdk.jdk' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,906 cekit        DEBUG    Copying module 'jboss.container.openjdk.jdk' to: 'target/image/modules/jboss.container.openjdk.jdk'
2019-05-22 11:15:37,914 cekit        DEBUG    Copying module 'jboss.container.java.jvm.api' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,914 cekit        DEBUG    Copying module 'jboss.container.java.jvm.api' to: 'target/image/modules/jboss.container.java.jvm.api'
2019-05-22 11:15:37,936 cekit        DEBUG    Copying module 'jboss.container.proxy.api' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,936 cekit        DEBUG    Copying module 'jboss.container.proxy.api' to: 'target/image/modules/jboss.container.proxy.api'
2019-05-22 11:15:37,949 cekit        DEBUG    Copying module 'jboss.container.java.proxy.bash' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,949 cekit        DEBUG    Copying module 'jboss.container.java.proxy.bash' to: 'target/image/modules/jboss.container.java.proxy.bash'
2019-05-22 11:15:37,961 cekit        DEBUG    Copying module 'jboss.container.java.jvm.bash' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,962 cekit        DEBUG    Copying module 'jboss.container.java.jvm.bash' to: 'target/image/modules/jboss.container.java.jvm.bash'
2019-05-22 11:15:37,972 cekit        DEBUG    Copying module 'os-java-run' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,972 cekit        DEBUG    Copying module 'os-java-run' to: 'target/image/modules/os-java-run'
2019-05-22 11:15:37,975 cekit        DEBUG    Copying module 'dynamic-resources' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,976 cekit        DEBUG    Copying module 'dynamic-resources' to: 'target/image/modules/dynamic-resources'
2019-05-22 11:15:37,982 cekit        DEBUG    Copying module 'jboss.container.jolokia.api' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,982 cekit        DEBUG    Copying module 'jboss.container.jolokia.api' to: 'target/image/modules/jboss.container.jolokia.api'
2019-05-22 11:15:37,997 cekit        DEBUG    Copying module 'jboss.container.jolokia.bash' required by 'wildfly/wildfly-runtime-170-centos7'.
2019-05-22 11:15:37,997 cekit        DEBUG    Copying module 'jboss.container.jolokia.bash' to: 'target/image/modules/jboss.container.jolokia.bash'
2019-05-22 11:15:38,025 cekit        INFO     Handling artifacts...
2019-05-22 11:15:38,025 cekit        INFO     Preparing resource 'jolokia-jvm-1.5.0.redhat-1-agent.jar'
2019-05-22 11:15:38,026 cekit        DEBUG    Checking 'target/image/jolokia-jvm-1.5.0.redhat-1-agent.jar' md5 hash...
2019-05-22 11:15:38,026 cekit        DEBUG    Computing md5 checksum for 'target/image/jolokia-jvm-1.5.0.redhat-1-agent.jar' file
2019-05-22 11:15:38,031 cekit        DEBUG    Hash is correct.
2019-05-22 11:15:38,031 cekit        DEBUG    Local resource 'jolokia-jvm-1.5.0.redhat-1-agent.jar' exists and is valid
2019-05-22 11:15:38,031 cekit        DEBUG    Artifacts handled
2019-05-22 11:15:38,031 cekit        INFO     Rendering Dockerfile...
2019-05-22 11:15:38,143 cekit        DEBUG    Dockerfile rendered
2019-05-22 11:15:38,144 cekit        DEBUG    Checking CEKit build dependencies...
2019-05-22 11:15:38,144 cekit        DEBUG    Checking if 'python-docker' dependency is provided...
2019-05-22 11:15:38,144 cekit        DEBUG    Required CEKit library 'python-docker' was found as a 'docker' module!
2019-05-22 11:15:38,145 cekit        DEBUG    Checking if 'docker-squash' dependency is provided...
2019-05-22 11:15:38,145 cekit        DEBUG    Required CEKit library 'docker-squash' was found as a 'docker_squash' module!
2019-05-22 11:15:38,145 cekit        DEBUG    All dependencies provided!
2019-05-22 11:15:38,145 cekit        INFO     Building container image using Docker...
2019-05-22 11:15:38,146 cekit        DEBUG    Building image with tags: 'wildfly/wildfly-runtime-170-centos7:17.0', 'wildfly/wildfly-runtime-170-centos7:latest'
2019-05-22 11:15:38,311 cekit        INFO     Docker: Step 1/45 : FROM centos:7
2019-05-22 11:15:38,312 cekit        INFO     Docker: 
2019-05-22 11:15:38,313 cekit        INFO     Docker: ---> 9f38484d220f
2019-05-22 11:15:38,314 cekit        INFO     Docker: Step 2/45 : USER root
2019-05-22 11:15:38,314 cekit        INFO     Docker: 
2019-05-22 11:15:38,315 cekit        INFO     Docker: ---> Using cache
2019-05-22 11:15:38,316 cekit        INFO     Docker: ---> fb4f4da53122
2019-05-22 11:15:38,316 cekit        INFO     Docker: Step 3/45 : RUN yum makecache
2019-05-22 11:15:38,317 cekit        INFO     Docker: 
2019-05-22 11:15:38,411 cekit        INFO     Docker: ---> Running in 05ddf2af1bcb
2019-05-22 11:15:38,941 cekit        INFO     Docker: Loaded plugins: fastestmirror, ovl
2019-05-22 11:15:39,016 cekit        INFO     Docker: Determining fastest mirrors
2019-05-22 11:15:39,926 cekit        INFO     Docker: * base: miroir.univ-paris13.fr
2019-05-22 11:15:39,927 cekit        INFO     Docker: * extras: miroir.univ-paris13.fr
2019-05-22 11:15:39,927 cekit        INFO     Docker: * updates: centos.mirror.fr.planethoster.net
2019-05-22 11:15:53,925 cekit        INFO     Docker: Metadata Cache Created
2019-05-22 11:15:56,271 cekit        INFO     Docker: Removing intermediate container 05ddf2af1bcb
2019-05-22 11:15:56,272 cekit        ERROR    You can look inside the failed image by running 'docker run --rm -ti fb4f4da53122 bash'
2019-05-22 11:15:56,272 cekit        ERROR    ('Image build failed, see logs above.', ParserError())
Traceback (most recent call last):
  File "/Users/jfdenise/workspaces/cekit/lib/python2.7/site-packages/cekit/cli.py", line 341, in run
    command.execute()
  File "/Users/jfdenise/workspaces/cekit/lib/python2.7/site-packages/cekit/builder.py", line 60, in execute
    self.run()
  File "/Users/jfdenise/workspaces/cekit/lib/python2.7/site-packages/cekit/builders/docker_builder.py", line 182, in run
    image_id = self._build_with_docker(docker_client)
  File "/Users/jfdenise/workspaces/cekit/lib/python2.7/site-packages/cekit/builders/docker_builder.py", line 148, in _build_with_docker
    raise CekitError(msg, ex)
CekitError: ('Image build failed, see logs above.', ParserError())
```

**Environment information:**
 - Operating system
Mac OS
 - CEKit version: Result of `cekit --version`
cekit --version
3.0.1

**Additional context**
Env:
python --version
Python 2.7.10

docker --version
Docker version 18.09.2, build 6247962
I am using Docker Desktop for Mac

diff --git a/tests/test_unit_builder_docker.py b/tests/test_unit_builder_docker.py
index bdd8378..a814d6f 100644
--- a/tests/test_unit_builder_docker.py
+++ b/tests/test_unit_builder_docker.py
@@ -26,86 +26,86 @@ config = Config()
 config.cfg['common'] = {'redhat': True}
 
 docker_success_output = [
-    b'{"stream":"Step 1/18 : FROM rhel7:7.5-released\\n"}\r\n',
-    b'{"stream":" ---\\u003e 7b875638cfd8\\n"}\r\n',
-    b'{"stream":"Step 2/18 : USER root\\n"}\r\n',
-    b'{"stream":" ---\\u003e Using cache\\n"}\r\n',
-    b'{"stream":" ---\\u003e eeeb32196208\\n"}\r\n',
-    b'{"stream":"Step 3/18 : COPY repos/content_sets_odcs.repo /etc/yum.repos.d/\\n"}\r\n',
-    b'{"stream":" ---\\u003e Using cache\\n"}\r\n',
-    b'{"stream":" ---\\u003e 5b8c17742206\\n"}\r\n',
-    b'{"stream":"Step 4/18 : RUN yum makecache\\n"}\r\n',
-    b'{"stream":" ---\\u003e Running in bbefb458e837\\n"}\r\n',
-    b'{"stream":"Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager\\n"}\r\n',
-    b'{"stream":"This system is not receiving updates. You can use subscription-manager on the host to register and assign subscriptions.\\n"}\r\n',
-    b'{"stream":"Metadata Cache Created\\n"}\r\n',
-    b'{"stream":" ---\\u003e 3c496e216ae4\\n"}\r\n',
-    b'{"stream":"Removing intermediate container bbefb458e837\\n"}\r\n',
-    b'{"stream":"Step 5/18 : COPY modules /tmp/scripts/\\n"}\r\n',
-    b'{"stream":" ---\\u003e d4128252660d\\n"}\r\n',
-    b'{"stream":"Removing intermediate container 14c16d02235a\\n"}\r\n',
-    b'{"stream":" ---\\u003e 382fd3d3b632\\n"}\r\n',
-    b'{"stream":"Removing intermediate container 7ce407d3f891\\n"}\r\n',
-    b'{"stream":"Step 16/18 : RUN rm /etc/yum.repos.d/content_sets_odcs.repo\\n"}\r\n',
-    b'{"stream":" ---\\u003e Running in e992e5580f21\\n"}\r\n',
-    b'{"stream":" ---\\u003e abf0d7a8ac3e\\n"}\r\n',
-    b'{"stream":"Removing intermediate container e992e5580f21\\n"}\r\n',
-    b'{"stream":"Step 17/18 : USER 185\\n"}\r\n',
-    b'{"stream":" ---\\u003e Running in 1148850ae2df\\n"}\r\n',
-    b'{"stream":" ---\\u003e 1a99d0e4c3cc\\n"}\r\n',
-    b'{"stream":"Removing intermediate container 1148850ae2df\\n"}\r\n',
-    b'{"stream":"Step 18/18 : WORKDIR /home/jboss\\n"}\r\n',
-    b'{"stream":" ---\\u003e 985573b8bb7b\\n"}\r\n',
-    b'{"stream":"Removing intermediate container 413ed29c9497\\n"}\r\n',
-    b'{"stream":"Successfully built 985573b8bb7b\\n"}\r\n'
+    {"stream": "Step 1/18 : FROM rhel7:7.5-released\n"},
+    {"stream": " ---> 7b875638cfd8\n"},
+    {"stream": "Step 2/18 : USER root\n"},
+    {"stream": " ---> Using cache\n"},
+    {"stream": " ---> eeeb32196208\n"},
+    {"stream": "Step 3/18 : COPY repos/content_sets_odcs.repo /etc/yum.repos.d/\n"},
+    {"stream": " ---> Using cache\n"},
+    {"stream": " ---> 5b8c17742206\n"},
+    {"stream": "Step 4/18 : RUN yum makecache\n"},
+    {"stream": " ---> Running in bbefb458e837\n"},
+    {"stream": "Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager\n"},
+    {"stream": "This system is not receiving updates. You can use subscription-manager on the host to register and assign subscriptions.\n"},
+    {"stream": "Metadata Cache Created\n"},
+    {"stream": " ---> 3c496e216ae4\n"},
+    {"stream": "Removing intermediate container bbefb458e837\n"},
+    {"stream": "Step 5/18 : COPY modules /tmp/scripts/\n"},
+    {"stream": " ---> d4128252660d\n"},
+    {"stream": "Removing intermediate container 14c16d02235a\n"},
+    {"stream": " ---> 382fd3d3b632\n"},
+    {"stream": "Removing intermediate container 7ce407d3f891\n"},
+    {"stream": "Step 16/18 : RUN rm /etc/yum.repos.d/content_sets_odcs.repo\n"},
+    {"stream": " ---> Running in e992e5580f21\n"},
+    {"stream": " ---> abf0d7a8ac3e\n"},
+    {"stream": "Removing intermediate container e992e5580f21\n"},
+    {"stream": "Step 17/18 : USER 185\n"},
+    {"stream": " ---> Running in 1148850ae2df\n"},
+    {"stream": " ---> 1a99d0e4c3cc\n"},
+    {"stream": "Removing intermediate container 1148850ae2df\n"},
+    {"stream": "Step 18/18 : WORKDIR /home/jboss\n"},
+    {"stream": " ---> 985573b8bb7b\n"},
+    {"stream": "Removing intermediate container 413ed29c9497\n"},
+    {"stream": "Successfully built 985573b8bb7b\n"}
 ]
 
 docker_fail_output = [
-    b'{"stream":"Step 1/159 : FROM ubi8-dev-preview/ubi-minimal\\n"}\r\n',
-    b'{"stream":" ---\\u003e c6070fd793df\\n"}\r\n',
-    b'{"stream":"Step 2/159 : USER root\\n"}\r\n',
-    b'{"stream":" ---\\u003e Using cache\\n"}\r\n',
-    b'{"stream":" ---\\u003e 3841bbce3fdd\\n"}\r\n',
-    b'{"stream":"Step 3/159 : COPY modules /tmp/scripts/\\n"}\r\n',
-    b'{"stream":" ---\\u003e Using cache\\n"}\r\n',
-    b'{"stream":" ---\\u003e 8f6d31270e03\\n"}\r\n',
-    b'{"stream":"Step 4/159 : COPY jboss-eap-7.2.1-patch.zip jboss-eap-7.2.zip jolokia-jvm-1.5.0.redhat-1-agent.jar txn-recovery-marker-jdbc-common-1.1.2.Final-redhat-00001.jar txn-recovery-marker-jdbc-hibernate5-1.1.2.Final-redhat-00001.jar openshift-ping-common-1.2.3.Final-redhat-1.jar openshift-ping-dns-1.2.3.Final-redhat-1.jar openshift-ping-kube-1.2.3.Final-redhat-1.jar oauth-20100527.jar activemq-rar-5.11.0.redhat-630371.rar jboss-logmanager-2.1.7.Final.jar rh-sso-7.2.2-eap7-adapter.zip rh-sso-7.2.2-saml-eap7-adapter.zip jmx_prometheus_javaagent-0.3.1.redhat-00006.jar /tmp/artifacts/\\n"}\r\n',
-    b'{"stream":" ---\\u003e Using cache\\n"}\r\n',
-    b'{"stream":" ---\\u003e b901f2266584\\n"}\r\n',
-    b'{"stream":"Step 5/159 : USER root\\n"}\r\n',
-    b'{"stream":" ---\\u003e Using cache\\n"}\r\n',
-    b'{"stream":" ---\\u003e 81a88b63f47f\\n"}\r\n',
-    b'{"stream":"Step 6/159 : RUN microdnf --setopt=tsflags=nodocs install -y maven     \\u0026\\u0026 rpm -q maven\\n"}\r\n',
-    b'{"stream":" ---\\u003e Running in 4763fe199ffd\\n"}\r\n',
-    b'{"stream":"\\u001b[91m\\n(process:8): librhsm-WARNING **: 09:58:25.023: Found 0 entitlement certificates\\n\\u001b[0m"}\r\n',
-    b'{"stream":"\\u001b[91m\\n(process:8): librhsm-WARNING **: 09:58:25.024: Found 0 entitlement certificates\\n\\u001b[0m"}\r\n',
-    b'{"stream":"Downloading metadata...\\n"}\r\n',
-    b'{"stream":"Downloading metadata...\\n"}\r\n',
-    b'{"stream":"\\u001b[91merror: No package matches \'maven\'\\n\\u001b[0m"}\r\n',
-    b'{"errorDetail":{"code":1,"message":"The command \'/bin/sh -c microdnf --setopt=tsflags=nodocs install -y maven     \\u0026\\u0026 rpm -q maven\' returned a non-zero code: 1"},"error":"The command \'/bin/sh -c microdnf --setopt=tsflags=nodocs install -y maven     \\u0026\\u0026 rpm -q maven\' returned a non-zero code: 1"}\r\n'
+    {"stream": "Step 1/159 : FROM ubi8-dev-preview/ubi-minimal\n"},
+    {"stream": " ---> c6070fd793df\n"},
+    {"stream": "Step 2/159 : USER root\n"},
+    {"stream": " ---> Using cache\n"},
+    {"stream": " ---> 3841bbce3fdd\n"},
+    {"stream": "Step 3/159 : COPY modules /tmp/scripts/\n"},
+    {"stream": " ---> Using cache\n"},
+    {"stream": " ---> 8f6d31270e03\n"},
+    {"stream": "Step 4/159 : COPY jboss-eap-7.2.1-patch.zip jboss-eap-7.2.zip jolokia-jvm-1.5.0.redhat-1-agent.jar txn-recovery-marker-jdbc-common-1.1.2.Final-redhat-00001.jar txn-recovery-marker-jdbc-hibernate5-1.1.2.Final-redhat-00001.jar openshift-ping-common-1.2.3.Final-redhat-1.jar openshift-ping-dns-1.2.3.Final-redhat-1.jar openshift-ping-kube-1.2.3.Final-redhat-1.jar oauth-20100527.jar activemq-rar-5.11.0.redhat-630371.rar jboss-logmanager-2.1.7.Final.jar rh-sso-7.2.2-eap7-adapter.zip rh-sso-7.2.2-saml-eap7-adapter.zip jmx_prometheus_javaagent-0.3.1.redhat-00006.jar /tmp/artifacts/\n"},
+    {"stream": " ---> Using cache\n"},
+    {"stream": " ---> b901f2266584\n"},
+    {"stream": "Step 5/159 : USER root\n"},
+    {"stream": " ---> Using cache\n"},
+    {"stream": " ---> 81a88b63f47f\n"},
+    {"stream": "Step 6/159 : RUN microdnf --setopt=tsflags=nodocs install -y maven     \u0026\u0026 rpm -q maven\n"},
+    {"stream": " ---> Running in 4763fe199ffd\n"},
+    {"stream": "\u001b[91m\n(process:8): librhsm-WARNING **: 09:58:25.023: Found 0 entitlement certificates\n\u001b[0m"},
+    {"stream": "\u001b[91m\n(process:8): librhsm-WARNING **: 09:58:25.024: Found 0 entitlement certificates\n\u001b[0m"},
+    {"stream": "Downloading metadata...\n"},
+    {"stream": "Downloading metadata...\n"},
+    {"stream": "\u001b[91merror: No package matches \'maven\'\n\u001b[0m"},
+    {"errorDetail": {"code": 1, "message": "The command \'/bin/sh -c microdnf --setopt=tsflags=nodocs install -y maven     \u0026\u0026 rpm -q maven\' returned a non-zero code: 1"},
+        "error": "The command \'/bin/sh -c microdnf --setopt=tsflags=nodocs install -y maven     \u0026\u0026 rpm -q maven\' returned a non-zero code: 1"}
 ]
 
 
 def test_docker_client_build(mocker, caplog):
     caplog.set_level(logging.DEBUG, logger="cekit")
 
-    builder = DockerBuilder(Map({'target': 'something'}), Map({'tags': ['foo', 'bar']}))
-
-    docker_client_class = mocker.patch('cekit.builders.docker_builder.APIClientClass')
     squash_class = mocker.patch('cekit.builders.docker_builder.Squash')
     squash = squash_class.return_value
+    docker_client_class = mocker.patch('cekit.builders.docker_builder.APIClientClass')
     docker_client = docker_client_class.return_value
     docker_client_build = mocker.patch.object(
         docker_client, 'build', return_value=docker_success_output)
 
+    builder = DockerBuilder(Map({'target': 'something'}), Map({'tags': ['foo', 'bar']}))
     builder.generator = Map({'image': {'from': 'FROM'}})
-
     builder.run()
 
     squash_class.assert_called_once_with(
         cleanup=True, docker=docker_client, from_layer="FROM", image="985573b8bb7b", log=logging.getLogger('cekit'))
     squash.run.assert_called_once_with()
-    docker_client_build.assert_called_once_with(path='something/image', pull=None, rm=True)
+    docker_client_build.assert_called_once_with(
+        decode=True, path='something/image', pull=None, rm=True)
     assert "Docker: This system is not receiving updates. You can use subscription-manager on the host to register and assign subscriptions." in caplog.text
     assert "Image built and available under following tags: foo, bar" in caplog.text
 
@@ -131,7 +131,8 @@ def test_docker_client_build_with_failure(mocker, caplog):
 
     squash_class.assert_not_called()
     squash.run.assert_not_called()
-    docker_client_build.assert_called_once_with(path='something/image', pull=None, rm=True)
+    docker_client_build.assert_called_once_with(
+        decode=True, path='something/image', pull=None, rm=True)
     assert "Docker: Step 3/159 : COPY modules /tmp/scripts/" in caplog.text
     assert "You can look inside the failed image by running 'docker run --rm -ti 81a88b63f47f bash'" in caplog.text
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
behave lxml mock pytest pytest-cov pytest-mock docker docker-squash pylint autopep8
apt-get update apt-get install -y gcc git
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astroid==3.3.9
autopep8==2.3.2
behave==1.2.6
-e git+https://github.com/cekit/cekit.git@dd522634604932a105166ed9674d3a4f58a2384b#egg=cekit
certifi==2025.1.31
charset-normalizer==3.4.1
click==8.1.8
colorlog==6.9.0
coverage==7.8.0
dill==0.3.9
docker==7.1.0
docker-squash==1.2.2
docopt==0.6.2
exceptiongroup==1.2.2
idna==3.10
iniconfig==2.1.0
isort==6.0.1
Jinja2==3.1.6
lxml==5.3.1
MarkupSafe==3.0.2
mccabe==0.7.0
mock==5.2.0
packaging==24.2
parse==1.20.2
parse_type==0.6.4
platformdirs==4.3.7
pluggy==1.5.0
pycodestyle==2.13.0
pykwalify==1.8.0
pylint==3.3.6
pytest==8.3.5
pytest-cov==6.0.0
pytest-mock==3.14.0
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requests==2.32.3
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
six==1.17.0
tomli==2.2.1
tomlkit==0.13.2
typing_extensions==4.13.0
urllib3==2.3.0

name: cekit
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==3.3.9
      - autopep8==2.3.2
      - behave==1.2.6
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - click==8.1.8
      - colorlog==6.9.0
      - coverage==7.8.0
      - dill==0.3.9
      - docker==7.1.0
      - docker-squash==1.2.2
      - docopt==0.6.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - iniconfig==2.1.0
      - isort==6.0.1
      - jinja2==3.1.6
      - lxml==5.3.1
      - markupsafe==3.0.2
      - mccabe==0.7.0
      - mock==5.2.0
      - packaging==24.2
      - parse==1.20.2
      - parse-type==0.6.4
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pycodestyle==2.13.0
      - pykwalify==1.8.0
      - pylint==3.3.6
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - pytest-mock==3.14.0
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.2
      - requests==2.32.3
      - ruamel-yaml==0.18.10
      - ruamel-yaml-clib==0.2.12
      - six==1.17.0
      - tomli==2.2.1
      - tomlkit==0.13.2
      - typing-extensions==4.13.0
      - urllib3==2.3.0
prefix: /opt/conda/envs/cekit

tests/test_unit_builder_docker.py::test_docker_client_build tests/test_unit_builder_docker.py::test_docker_client_build_with_failure
tests/test_unit_builder_docker.py::test_docker_tag
cekit/builders/docker_builder.py
cekit/builders/docker_builder.py