Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
```