Docker Community Forums

Share and learn in the Docker community.

Attributerror docker import

(Widyanjani) #1

so i have a python file like this :
import docker
client = docker.from_env()“ubuntu”, “echo hello world”)

and then i try to run the python file but i got error like this :
Traceback (most recent call last):
File “”, line 3, in“ubuntu”, “echo hello world”)
AttributeError: ‘function’ object has no attribute ‘run’

what’s the problem? please help me asap, thankyou