Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manugraj/docker-cli
A straight forward tool to get information from docker command line and try to parse into json format as far as possible.
https://github.com/manugraj/docker-cli
docker docker-compose
Last synced: about 1 month ago
JSON representation
A straight forward tool to get information from docker command line and try to parse into json format as far as possible.
- Host: GitHub
- URL: https://github.com/manugraj/docker-cli
- Owner: manugraj
- Created: 2021-06-13T13:32:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-08T01:36:26.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T09:27:07.037Z (3 months ago)
- Topics: docker, docker-compose
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker-cli
A straight forward tool to get information from docker command line and try to parse into json format as far as possible.## Why not docker api?
- The api schema might change and response data might change so often.
- Docker-cli uses docker cli to get response and try to format them into json format## Installation
`pip install docker-cli`## Main methods
- `is_docker_set()` to verify docker installation and availability
```bash
docker_cli.is_docker_set()
```
- To run docker commands
```bash
Request: docker_cli.docker("ps")
Response Structure:
DockerResponse(command='docker ps', status='SUCCESS', type='JSON', data=[])```
- To run docker commands
```bash
Request: docker_cli.docker_compose("up -d")
Response Structure:
Similar as that of docker commands
```