Repository Details
Shared by
HelloGitHub Rating
0 ratings
官方开源的 Python 操作 Docker 的工具库
Past 7 days Received 0 stars ✨
Use arrow keys to explore dates, Home and End for the first and last date, Escape to dismiss.| Date | Star | Daily change |
|---|---|---|
| 周二 | 7,224 | — |
| 周三 | 7,224 | 0 |
| 周四 | 7,224 | 0 |
| 周五 | 7,223 | -1 |
| 周六 | 7,223 | 0 |
| 周日 | 7,225 | +2 |
| 周一 | 7,224 | -1 |
7.2k
Stars
No
Chinese
Python
Language
Yes
Active
465
Contributors
575
Issues
Yes
Organization
None
Latest
2k
Forks
Apache-2.0
License
用 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