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

updates to change execute() to exec_create/exec_start

Open oskapt opened this issue 10 years ago • 5 comments

docker-py no longer supports c.execute() - it has been broken out into c.exec_create() and c.exec_start(). This commit mostly covers that, and in the process solved a couple of other issues I encountered in my env. I've made the whole thing more generic and thus more flexible. It also works under Python2, so you can close out that issue from Feb.

  1. works under python2
  2. network function uses /proc/net/dev for statistics, which should always work
  3. works on images that don't have ifconfig installed

oskapt avatar Oct 12 '15 17:10 oskapt

Fixes #1

oskapt avatar Oct 12 '15 17:10 oskapt

Latest commits add support for docker-py version option when creating client. Resolves issues with client/server API version conflicts by defaulting to 'auto' in config.

Any reason why you're ignoring my PRs?

oskapt avatar Apr 13 '16 13:04 oskapt

Sorry @oskapt just been busy and then forget to get back to it. Let me have a look

ggtools avatar Apr 13 '16 13:04 ggtools

Just a question: you change the shebang to use python instead of python3 which means it could be python2 in this cas, the print( will work but adding a from __future__ import print_function would be probably better.

ggtools avatar Apr 13 '16 13:04 ggtools

I don't run python3 anywhere, so that was a quick hack back in October just to get things to work. I'm not up to speed on how best to get the two to play nice with each other. Does it really matter if it might run under python2? Specifying python3 in the shebang breaks it for environments where 3 isn't installed. I thought env python was friendlier.

oskapt avatar Apr 13 '16 13:04 oskapt