运行python:
[email protected]:~$ python
import docker
client = docker.from_env()
client.containers.run(“ubuntu”, “echo hello world”)
输入以上代码后报以下错
解决方法:
将[email protected]:~$ python
改成[email protected]:~$ sudo python
运行成功!如图所示:
运行python:
[email protected]:~$ python
import docker
client = docker.from_env()
client.containers.run(“ubuntu”, “echo hello world”)
输入以上代码后报以下错
将[email protected]:~$ python
改成[email protected]:~$ sudo python
运行成功!如图所示:
相关文章: