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

女生的网名这么多〃 提交于 2019-12-07 04:10:36

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/30970969/exec-is-not-supported-by-the-lxc-driver-how-to-get-around-this

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!