test-kitchen / kitchen-docker

A Test Kitchen Driver for Docker
Apache License 2.0
462 stars 232 forks source link

No build output visible on mac os 10.11 #227

Open shoan opened 8 years ago

shoan commented 8 years ago

I am testing an ansible playbook using kitchen (Test Kitchen version 1.11.1) with the latest docker (beta 1.12.1-beta24 (build: 11525)). But during the build process, there is no output visible of the steps occurring inside the container/vm. The only way to see some output is to hit Control + C, which is not self serving.

When I attempt the similar test on Ubuntu, I get a series of build steps being performed by Kitchen to create the environment, then ansible executing the playbook and finally the tests running.

How do I see the current process running in the test environment? Is there a log?

$ bundle exec kitchen test os-ansible-latest-ubuntu-1404 -l debug
-----> Starting Kitchen (v1.11.1)
D      [kitchen::driver::docker command] BEGIN (docker >> /dev/null 2>&1)
D      [kitchen::driver::docker command] END (0m0.01s)
-----> Cleaning up any prior instances of <os-ansible-latest-ubuntu-1404>
-----> Destroying <os-ansible-latest-ubuntu-1404>...
       Finished destroying <os-ansible-latest-ubuntu-1404> (0m0.00s).
-----> Testing <os-ansible-latest-ubuntu-1404>
-----> Creating <os-ansible-latest-ubuntu-1404>...
D      [kitchen::driver::docker command] BEGIN (docker -H unix:///var/run/docker.sock build -f /Volumes/Home/Users/shoan/Projects/portea/devops/ansible-os-hardening/Dockerfile-kitchen20160831-26048-v28y2n .)
^C       Sending build context to Docker daemon 376.8 kB
       Step 1 : FROM ubuntu:14.04
        ---> 4a725d3b3b1c
       Step 2 : RUN dpkg-divert --local --rename --add /sbin/initctl
        ---> Using cache
        ---> d2ddff64e308
       Step 3 : RUN ln -sf /bin/true /sbin/initctl
        ---> Using cache
        ---> d5d1589d1d80
       Step 4 : ENV DEBIAN_FRONTEND noninteractive
        ---> Using cache
        ---> 2cc192a1f71f
       Step 5 : RUN apt-get update
        ---> Using cache
        ---> db5ca7f91a04
       Step 6 : RUN apt-get install -y sudo openssh-server curl lsb-release
        ---> Using cache
coderanger commented 8 years ago

Does this repro with a release version of Docker? I don't think Kitchen does much fancy stuff re: command execution, it just runs it with stdout and stderr still hooked up to the same as the main process.

shoan commented 8 years ago

Tried with the stable channel release too. Same behaviour is observed.

Also tried with vagrant. This time, the output is visible.