OpenConnect setup with Android Docker image


I am trying to setup OpenConnect during a step in my workflow. A coworker had its script working on a MacOS stack (for his iOS workflow) but I am unable to make it work for my Android & Docker stack.

The install works well but when launching OpenConnect with its parameters, I have

Failed to bind local tun device (TUNSETIFF): Operation not permitted
To configure local networking, openconnect must be running as root
See for more information

I found a similar issue on StackOverflow here but the suggested answer require to run Docker with network capabilities. I don’t think I can do this with the default stack, am I wrong? Could I achieve this with my own Docker image? Or is there another solution?


The docker container your build is running in on the Android & Docker stack runs with full --privileged flag/mode, so it definitely should be possible :wink:

No custom docker image is required, and in fact this flag is applied on the container not on the image - any image can run in --privileged mode, that’s a flag to be passed when you start a container from the image, and that’s exactly what we do when we start the build on the Android & Docker stacks :wink:

If you’d have any questions just let us know! :slight_smile:

Well I am relieved I don’t have to use a custom stack, even if I have no idea what to do to fix this issue :slight_smile: I will investigate more to find out.

Thanks a lot for your answer! :wink:

1 Like

Let us know how it goes or if you’d have any questions @nfesquet! :wink:

1 Like