Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates to change execute() to exec_create/exec_start #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

oskapt
Copy link

@oskapt oskapt commented Oct 12, 2015

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

1. works under python2
2. network module uses /proc/net/dev for statistics, which should always work
3. ggtools#2 gets around images that don't have ifconfig installed
@oskapt
Copy link
Author

oskapt commented Oct 12, 2015

Fixes #1

oskapt added 2 commits April 13, 2016 10:01
When using docker-py 1.8.0 (released on Apr 6 2016), this script
can generate the error message about client API version being newer
than server (1.22 / 1.21). The fix for this, according to
[here](docker/docker-py#1032) is to
specify the version or do specify 'auto' to use the server
version. I've added `--version` as a keyword argument before the
positional arguments for Client.
@oskapt
Copy link
Author

oskapt commented Apr 13, 2016

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?

@ggtools
Copy link
Owner

ggtools commented Apr 13, 2016

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

@ggtools
Copy link
Owner

ggtools commented Apr 13, 2016

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.

@oskapt
Copy link
Author

oskapt commented Apr 13, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants