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

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

docker exec ... 

This works fine on CoreOS, but I also want to test it on CircleCI . When I try to run this 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 

Below are the results of testing CircleCI .

I tried to change docker exec to docker --exec-driver native exec , however I am not quite sure what a β€œdriver” is, how to change it, or even if it is possible or desirable.

What would be the best way to resolve this error?

+6
source share
2 answers

The runtime driver is what docker uses behind the scenes to actually run containers. There are two popular options: lxc (old default), native (current default)

CircleCI doesn't seem to support the native runtime driver yet, so it lacks some features in the docker. Apparently, they are aware of this and have suggested a workaround .

+11
source

I had a similar problem with docker exec not working. I tried working using lxc-attach, but that is not very good. I suspect that I could work with him a little longer.

In the end, I created a custom bash script in a container that had all the commands that I needed to run, and used the usual docker run command.

+1
source

Source: https://habr.com/ru/post/989493/


All Articles