Exec is not supported by the lxc driver: how to get around this?

2.4k views Asked by At

Using Docker on CoreOS, I have a script which calls:

docker exec ...

This works fine on CoreOS, but I also want to test it on CircleCI. When I try to run that script on CircleCI, I get:

time="2015-06-22T01:14:51Z" level=fatal msg="Error response from daemon: Unsupported: Exec is not supported by the lxc driver" ./tests/run.sh returned exit code 1

Here are the test results on CircleCI.

I tried changing docker exec to docker --exec-driver native exec, however I am not entirely sure what a "driver" is, how to change it, or even if it's possible or desirable to do so.

What would be the best course of action around this error?

2

There are 2 answers

1
semekh On

An execution driver is what docker uses behind the scene to actually run the containers. There are two popular options: lxc (former default), native (current default)

Looks like CircleCI doesn't support native execution driver yet, which is why it lacks some of the features in docker. Apparently they are aware of this and have proposed a workaround.

0
John-Paul Stanford On

I had a similar problem with docker exec not working. I tried the work around that uses lxc-attach, but this did not work very well. I suspect I could have got it working with a bit more time.

In the end I made a custom bash script within the container that had all the commands I needed to run and used a normal "docker run" command.