Docker Community Forums

Share and learn in the Docker community.

Docker-py API for docker on windows


(Anvika1) #1

Hi i am tying to use the docker-py API and i am using docker on windows.
I am having trouble in making docker listen to a tcp port. I know the docker.conf file has to be changed. I can do that in ubuntu, but i don’t know how it works on windows. I am getting an error when I run the python script,
cli = Client(base_url=‘unix://var/run/docker.sock’). I also tried changing it to, cli = client(base_url=’ tcp:// '). I still get an error which says:

Traceback (most recent call last):
File “”, line 1, in
TypeError: ‘module’ object is not callable

which i think is because of not changing the TCP port. Please help me resolve this.

Thanks in advance.

Pushimg image into the repository