Closed peter1000 closed 10 years ago
:+1: figured the build stuff out - the image existed already before.
anyway it would be an extra layer but the real advantage it is all in python?
To build the dockerfile with the package
#!/usr/bin/env python
import docker
c = docker.Client(base_url='unix://var/run/docker.sock',
version='1.6',
timeout=10)
c.build(path="/home/workerm/Downloads/docker-py-master", tag="subuser-test", quiet=False, fileobj=None, nocache=False, rm=False, stream=False)
It would be nice, in terms of getting rid of this garbage:
However, I really do not want to do this:
I think one can get rid of some of the dependencies: I already remove 'python-websocket'
About the API changes: I'm not sure if it would be much work: anyway I will still look into it as I'm just interested how much I can strip off for a bare naked
version.
No problem if you do not want to use it.
at the moment I will not have time to look into this: if you want you can close it?
You were right, this will be better.
but it will add additional dependencies.
I do not have any more the stuff I played around with - but one could try to get rid of the things subuser does not need.
On the other hand maybe it's easier to make it just an dependencies: in that case if the docker api changes one can just update the module.
I'm still busy with other things: but might look into it...
I am convinced we can eliminate all dependencies. Writing to a socket file really isn't that complicated.
I have implemented my own direct communications with the Docker daemon.
I was wondering what you think:
would it make sense instead of all the subprocess calls to use a much simplified version of something like:
https://github.com/dotcloud/docker-py/blob/master/docker/client.py I mean only the things what subuser needs:
CONS::
PROS::
played a bit with the above: https://github.com/dotcloud/docker-py/blob/master/docker
had to install: python-requests python-urllib3 python-websocket
for just a fast test quite nice: build command did not work in the beginning though - probably mistake of mine