docker-py icon indicating copy to clipboard operation
docker-py copied to clipboard

Add 'sysctl' option support

Open jtakkala opened this issue 10 years ago • 0 comments

PR docker/docker#19265 merged 'sysctl' support into docker Remote API as of v1.24, but there seems to be no way to use this feature with docker-py. Has anyone started work on such a feature? If not, I will create a PR for a patch that we're using internally.

The sysctl option expects a dictionary of { <name>: <value> } (for example: { "net.ipv4.ip_forward": "1" }), where the types of both objects are of type string. My patch checks if is not a string type, and if that's the case, it casts it using str(). I originally intended to do the casting in docker-compose (for which I have another patch), but now that I've looked closer at the API I believe it belongs in the API. I'm open to debate on that matter though.

jtakkala avatar Jul 29 '16 10:07 jtakkala