Am I using Docker correctly?

docker

#1

I didn’t quite understand from the documentation, but I’m trying to debug my Docker usage in my CircleCI build.

Noticeably, my tests work locally (haha, of course) and on Travis CI. However, they seem to fail on Circle CI and Wercker.

Is there a trick to getting output back from a container in Circle CI?

Here’s my most recent build: https://circleci.com/gh/b-long/jedi/32

And a shell script I’m invoking in my container, doesn’t appear to yield any output. Note, output is given on Travis CI: https://github.com/b-long/jedi/blob/9bcc125a14af0f6a8ec15919407bc557de505827/client/src/test/resources/test.sh


#2

Hello,

Could you please describe which output you’re expecting?

It seems the command mvn package displays a very large output in the build you linked.


#3

Hi @zzak and thanks for reaching out! Yes, sorry about that, the build output is quite long. I should have pointed to specific issues I’m having. Consider the following example:

  1. I have a unit test that creates a container from the busybox image.
  2. Inside that container, I run a simple shell script, which you can view here.
  3. Since I know the output expected from the script, I’m asserting that the actual output is equal to the expected output. The JUnit assertion is here .

#4

(sorry, rate limited to 2 links per post)

As I mentioned, this is working on Travis CI (here), but not CircleCI or Wercker. Any idea what might be causing this?

To view the CircleCI output, you’ll need to download the file (here) and go to line #14989. At that line, you’ll see the following message :

ests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 15.356 sec <<< FAILURE!
shellScript(com.github.blong.jedi.client.BusyBoxTest)  Time elapsed: 4.883 sec  <<< ERROR!
com.github.dockerjava.api.exception.InternalServerErrorException: Unsupported: Exec is not supported by the lxc driver

I realize it’s not really in scope for CircleCI, but the Wercker job is failing in yet another way, with the following error :

org.newsclub.net.unix.AFUNIXSocketException: No such file or directory (socket: /run/docker.sock)

I wonder if these errors have something to do with the Docker driver(s) being used? I’m not familiar with Docker drivers, but the message from the CircleCI job seems to indicate they are important.


#5

I’m migrated to Circle CI 2.0, however I still am unable to successfully build a simple project that relies on Docker. Can someone please comment on this?

This is a key differentiator for me, and as you can see, things are working in the Travis CI ecosystem: https://github.com/b-long/jedi/pull/12


#6

Hi all, please ignore the rest of my posts in this thread as it’s no longer relevant.

I’ve spent hours attempting to debug this issue and I simply can’t figure it out. I’m thinking about removing CircleCI from my roadmap, but I really don’t want to do that. Can anyone look at my latest build and provide some insight?

The error I’m getting is below:

rpc error: code = 13 desc = invalid header field value "oci runtime error: exec failed: container_linux.go:247: starting container process caused \"exec: \\\"/container-work/test.sh\\\": stat /container-work/test.sh: no such file or directory\"\n"

Here’s the latest build: https://circleci.com/gh/b-long/jedi/71

My configuration file is here: https://github.com/b-long/jedi/blob/c8d1730c80bfde27db5a6712970e6998ae8df73c/circle.yml

Essentially, I’m just trying to use the Docker driver within Java to pull some images, create containers, and run them. Note that the failure occurs when I attempt to share / mount a file ( /container-work/test.sh ) from the host to the container.

Any help is greatly appreciated.


#7

I’m removing CircleCI from my roadmap. More information is available here: https://github.com/b-long/jedi/pull/12


#8