Repository Details
Shared by


HelloGitHub Rating
0 ratings
Free•Apache-2.0
Claim
Discuss
Collect
Share
7.1k
Stars
No
Chinese
Python
Language
Yes
Active
391
Contributors
531
Issues
Yes
Organization
7.1.0
Latest
2k
Forks
Apache-2.0
License
More
用 Python 操作 Docker 的库。Docker 官方出品的 Python 库,可以用来批量、自动管理镜像
```python
import docker
client = docker.from_env()
client.images.pull('nginx')
# <Image 'nginx'>
client.containers.run("ubuntu:latest", "echo hello world")
# 'hello world\n'
client.containers.list()
# [<Container '45e6d2de7c54'>, <Container 'db18e4f20eaa'>, ...]
```
Comments
Rating:
No comments yet