[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[atomic-devel] Question about atomic-reactor and 'docker build' stdout



Hello all,
    I was curious if anyone knew of a way to capture effectively the
equivalent of stdout from 'docker build .'  when using
atomic-reactor's python api? I'm not seeing how I would go about it
and thought I would just ask.

I'm familiar with doing the following (with source predefined):
    response = \
       build_image_using_hosts_docker(
            "buildimage",
            source,
            "test-build"
        )
    response.build_logs

Which provides the logs from the atomic-reactor run inside the
container. I also found that using DockerTasker would allow me to
reference this same information, but I was curious if there's in
introspection point that allows to grab the following information:

# docker build .
Sending build context to Docker daemon   105 kB
Sending build context to Docker daemon
Step 0 : FROM fedora:latest
 ---> ded7cd95e059
Step 1 : MAINTAINER http://fedoraproject.org/wiki/Cloud
 ---> Using cache
 ---> 9f97f024d47a
Step 2 : RUN dnf -y update && dnf clean all
 ---> Using cache
 ---> e5b0ea2b7754
Step 3 : RUN dnf -y install httpd && dnf clean all
 ---> Using cache
 ---> 0c9f137f508c
Step 4 : RUN echo "Apache" >> /var/www/html/index.html
 ---> Using cache
 ---> 85461d238aef
Step 5 : EXPOSE 80
 ---> Using cache
 ---> 7c08c855c39f
Step 6 : ADD run-apache.sh /run-apache.sh
 ---> 83f8d7985d04
Removing intermediate container c3107d502888
Step 7 : RUN chmod -v +x /run-apache.sh
 ---> Running in e0cce7c17116
mode of '/run-apache.sh' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
 ---> 93c019e967d6
Removing intermediate container e0cce7c17116
Step 8 : CMD /run-apache.sh
 ---> Running in 6bd5a6cfc7f3
 ---> e6d701d7f85e
Removing intermediate container 6bd5a6cfc7f3
Successfully built e6d701d7f85e

Or even if there is such information available since atomic-reactor is
triggering builds from the docker.Client python api.

If anyone has information about this they are willing to share, it
would be greatly appreciated.

Thank you,
-AdamM


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]