dockops 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dockops-0.1.0/LICENSE +21 -0
- dockops-0.1.0/PKG-INFO +95 -0
- dockops-0.1.0/README.md +58 -0
- dockops-0.1.0/dockops/__init__.py +1 -0
- dockops-0.1.0/dockops/cli.py +25 -0
- dockops-0.1.0/dockops/commands/__init__.py +0 -0
- dockops-0.1.0/dockops/commands/clean.py +53 -0
- dockops-0.1.0/dockops/commands/health.py +77 -0
- dockops-0.1.0/dockops/commands/ports.py +51 -0
- dockops-0.1.0/dockops.egg-info/PKG-INFO +95 -0
- dockops-0.1.0/dockops.egg-info/SOURCES.txt +15 -0
- dockops-0.1.0/dockops.egg-info/dependency_links.txt +1 -0
- dockops-0.1.0/dockops.egg-info/entry_points.txt +2 -0
- dockops-0.1.0/dockops.egg-info/requires.txt +3 -0
- dockops-0.1.0/dockops.egg-info/top_level.txt +1 -0
- dockops-0.1.0/pyproject.toml +24 -0
- dockops-0.1.0/setup.cfg +4 -0
dockops-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Akhil
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dockops-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dockops
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A developer CLI for common Docker tasks
|
|
5
|
+
Author-email: Akhil <you@email.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Akhil
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/akhilpr7/dockops
|
|
29
|
+
Keywords: docker,cli,devops
|
|
30
|
+
Requires-Python: >=3.8
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: click>=8.0
|
|
34
|
+
Requires-Dist: rich>=13.0
|
|
35
|
+
Requires-Dist: docker>=6.0
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# dockerkit 🐳
|
|
39
|
+
|
|
40
|
+
A developer CLI for common Docker tasks — clean, scaffold, inspect.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+

|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install dockerkit
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Commands
|
|
57
|
+
|
|
58
|
+
### `dockerkit clean`
|
|
59
|
+
Remove stopped containers, dangling images, unused volumes and networks in one shot.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
dockerkit clean # with confirmation prompt
|
|
63
|
+
dockerkit clean --force # skip confirmation
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### `dockerkit ports`
|
|
68
|
+
See all ports in use and which container owns them.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
dockerkit ports
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### `dockerkit health`
|
|
77
|
+
View health status, uptime, CPU%, and memory of all running containers.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
dockerkit health # running containers only
|
|
81
|
+
dockerkit health --all # include stopped containers
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Requirements
|
|
87
|
+
|
|
88
|
+
- Python 3.8+
|
|
89
|
+
- Docker running locally
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT
|
dockops-0.1.0/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# dockerkit 🐳
|
|
2
|
+
|
|
3
|
+
A developer CLI for common Docker tasks — clean, scaffold, inspect.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install dockerkit
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Commands
|
|
20
|
+
|
|
21
|
+
### `dockerkit clean`
|
|
22
|
+
Remove stopped containers, dangling images, unused volumes and networks in one shot.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
dockerkit clean # with confirmation prompt
|
|
26
|
+
dockerkit clean --force # skip confirmation
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### `dockerkit ports`
|
|
31
|
+
See all ports in use and which container owns them.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
dockerkit ports
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### `dockerkit health`
|
|
40
|
+
View health status, uptime, CPU%, and memory of all running containers.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
dockerkit health # running containers only
|
|
44
|
+
dockerkit health --all # include stopped containers
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Requirements
|
|
50
|
+
|
|
51
|
+
- Python 3.8+
|
|
52
|
+
- Docker running locally
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import click
|
|
2
|
+
from rich.console import Console
|
|
3
|
+
from dockops.commands import clean, ports, health
|
|
4
|
+
|
|
5
|
+
console = Console()
|
|
6
|
+
|
|
7
|
+
@click.group()
|
|
8
|
+
@click.version_option(version="0.1.0", prog_name="dockops")
|
|
9
|
+
def main():
|
|
10
|
+
"""
|
|
11
|
+
\b
|
|
12
|
+
██████╗ ██████╗ ██████╗██╗ ██╗ ██████╗ ██████╗ ███████╗
|
|
13
|
+
██╔══██╗██╔═══██╗██╔════╝██║ ██╔╝ ██╔═══██╗██╔══██╗██╔════╝
|
|
14
|
+
██║ ██║██║ ██║██║ █████╔╝ ██║ ██║██████╔╝███████╗
|
|
15
|
+
██║ ██║██║ ██║██║ ██╔═██╗ ██║ ██║██╔═══╝ ╚════██║
|
|
16
|
+
██████╔╝╚██████╔╝╚██████╗██║ ██╗ ╚██████╔╝██║ ███████║
|
|
17
|
+
╚═════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝
|
|
18
|
+
|
|
19
|
+
A developer CLI for common Docker tasks.
|
|
20
|
+
"""
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
main.add_command(clean.run, name="clean")
|
|
24
|
+
main.add_command(ports.run, name="ports")
|
|
25
|
+
main.add_command(health.run, name="health")
|
|
File without changes
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import click
|
|
2
|
+
import docker
|
|
3
|
+
from rich.console import Console
|
|
4
|
+
from rich.panel import Panel
|
|
5
|
+
from rich.table import Table
|
|
6
|
+
|
|
7
|
+
console = Console()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@click.command()
|
|
11
|
+
@click.option("--force", "-f", is_flag=True, help="Skip confirmation prompt")
|
|
12
|
+
def run(force):
|
|
13
|
+
"""Remove stopped containers, dangling images, and unused volumes."""
|
|
14
|
+
|
|
15
|
+
if not force:
|
|
16
|
+
click.confirm(
|
|
17
|
+
"This will remove stopped containers, dangling images, and unused volumes. Continue?",
|
|
18
|
+
abort=True,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
client = docker.from_env()
|
|
23
|
+
except docker.errors.DockerException:
|
|
24
|
+
console.print("[bold red]✘ Docker is not running. Please start Docker first.[/bold red]")
|
|
25
|
+
return
|
|
26
|
+
|
|
27
|
+
table = Table(title="Cleanup Summary", show_header=True, header_style="bold cyan")
|
|
28
|
+
table.add_column("Resource", style="white")
|
|
29
|
+
table.add_column("Result", style="green")
|
|
30
|
+
|
|
31
|
+
# Remove stopped containers
|
|
32
|
+
result = client.containers.prune()
|
|
33
|
+
deleted = result.get("ContainersDeleted") or []
|
|
34
|
+
table.add_row("Stopped Containers", f"{len(deleted)} removed")
|
|
35
|
+
|
|
36
|
+
# Remove dangling images
|
|
37
|
+
result = client.images.prune()
|
|
38
|
+
deleted = result.get("ImagesDeleted") or []
|
|
39
|
+
table.add_row("Dangling Images", f"{len(deleted)} removed")
|
|
40
|
+
|
|
41
|
+
# Remove unused volumes
|
|
42
|
+
result = client.volumes.prune()
|
|
43
|
+
deleted = result.get("VolumesDeleted") or []
|
|
44
|
+
table.add_row("Unused Volumes", f"{len(deleted)} removed")
|
|
45
|
+
|
|
46
|
+
# Remove unused networks
|
|
47
|
+
result = client.networks.prune()
|
|
48
|
+
deleted = result.get("NetworksDeleted") or []
|
|
49
|
+
table.add_row("Unused Networks", f"{len(deleted)} removed")
|
|
50
|
+
|
|
51
|
+
console.print()
|
|
52
|
+
console.print(table)
|
|
53
|
+
console.print(Panel.fit("[bold green]✔ Docker cleanup complete![/bold green]", border_style="green"))
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import click
|
|
2
|
+
import docker
|
|
3
|
+
from rich.console import Console
|
|
4
|
+
from rich.table import Table
|
|
5
|
+
|
|
6
|
+
console = Console()
|
|
7
|
+
|
|
8
|
+
STATUS_STYLE = {
|
|
9
|
+
"running": "[bold green]● running[/bold green]",
|
|
10
|
+
"exited": "[bold red]✘ exited[/bold red]",
|
|
11
|
+
"paused": "[bold yellow]⏸ paused[/bold yellow]",
|
|
12
|
+
"restarting": "[bold blue]↺ restarting[/bold blue]",
|
|
13
|
+
"dead": "[bold red]✘ dead[/bold red]",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@click.command()
|
|
18
|
+
@click.option("--all", "-a", "show_all", is_flag=True, help="Show stopped containers too")
|
|
19
|
+
def run(show_all):
|
|
20
|
+
"""Show health status of all running containers."""
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
client = docker.from_env()
|
|
24
|
+
except docker.errors.DockerException:
|
|
25
|
+
console.print("[bold red]✘ Docker is not running. Please start Docker first.[/bold red]")
|
|
26
|
+
return
|
|
27
|
+
|
|
28
|
+
containers = client.containers.list(all=show_all)
|
|
29
|
+
|
|
30
|
+
if not containers:
|
|
31
|
+
console.print("[yellow]No containers found.[/yellow]")
|
|
32
|
+
return
|
|
33
|
+
|
|
34
|
+
table = Table(title="Container Health Status", show_header=True, header_style="bold cyan")
|
|
35
|
+
table.add_column("Container", style="white", no_wrap=True)
|
|
36
|
+
table.add_column("Image", style="dim")
|
|
37
|
+
table.add_column("Status", no_wrap=True)
|
|
38
|
+
table.add_column("Uptime", style="cyan")
|
|
39
|
+
table.add_column("CPU %", justify="right", style="yellow")
|
|
40
|
+
table.add_column("Memory", justify="right", style="magenta")
|
|
41
|
+
|
|
42
|
+
for container in containers:
|
|
43
|
+
name = container.name
|
|
44
|
+
image = container.image.tags[0] if container.image.tags else container.image.short_id
|
|
45
|
+
status = container.status
|
|
46
|
+
status_display = STATUS_STYLE.get(status, f"[dim]{status}[/dim]")
|
|
47
|
+
|
|
48
|
+
# Get uptime from status string e.g. "Up 2 hours"
|
|
49
|
+
uptime = container.attrs.get("Status", "-")
|
|
50
|
+
|
|
51
|
+
# Get stats (only for running containers)
|
|
52
|
+
cpu_display = "-"
|
|
53
|
+
mem_display = "-"
|
|
54
|
+
|
|
55
|
+
if status == "running":
|
|
56
|
+
try:
|
|
57
|
+
stats = container.stats(stream=False)
|
|
58
|
+
cpu_delta = stats["cpu_stats"]["cpu_usage"]["total_usage"] - \
|
|
59
|
+
stats["precpu_stats"]["cpu_usage"]["total_usage"]
|
|
60
|
+
system_delta = stats["cpu_stats"]["system_cpu_usage"] - \
|
|
61
|
+
stats["precpu_stats"]["system_cpu_usage"]
|
|
62
|
+
num_cpus = stats["cpu_stats"].get("online_cpus", 1)
|
|
63
|
+
if system_delta > 0:
|
|
64
|
+
cpu_pct = (cpu_delta / system_delta) * num_cpus * 100.0
|
|
65
|
+
cpu_display = f"{cpu_pct:.1f}%"
|
|
66
|
+
|
|
67
|
+
mem_usage = stats["memory_stats"].get("usage", 0)
|
|
68
|
+
mem_limit = stats["memory_stats"].get("limit", 1)
|
|
69
|
+
mem_mb = mem_usage / (1024 * 1024)
|
|
70
|
+
mem_display = f"{mem_mb:.1f} MB"
|
|
71
|
+
except Exception:
|
|
72
|
+
pass
|
|
73
|
+
|
|
74
|
+
table.add_row(name, image, status_display, uptime, cpu_display, mem_display)
|
|
75
|
+
|
|
76
|
+
console.print()
|
|
77
|
+
console.print(table)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import click
|
|
2
|
+
import docker
|
|
3
|
+
from rich.console import Console
|
|
4
|
+
from rich.table import Table
|
|
5
|
+
|
|
6
|
+
console = Console()
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@click.command()
|
|
10
|
+
def run():
|
|
11
|
+
"""Show all ports in use and which container owns them."""
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
client = docker.from_env()
|
|
15
|
+
except docker.errors.DockerException:
|
|
16
|
+
console.print("[bold red]✘ Docker is not running. Please start Docker first.[/bold red]")
|
|
17
|
+
return
|
|
18
|
+
|
|
19
|
+
containers = client.containers.list()
|
|
20
|
+
|
|
21
|
+
if not containers:
|
|
22
|
+
console.print("[yellow]No running containers found.[/yellow]")
|
|
23
|
+
return
|
|
24
|
+
|
|
25
|
+
table = Table(title="Docker Port Mappings", show_header=True, header_style="bold cyan")
|
|
26
|
+
table.add_column("Container", style="white")
|
|
27
|
+
table.add_column("Image", style="dim")
|
|
28
|
+
table.add_column("Host Port", style="bold yellow")
|
|
29
|
+
table.add_column("Container Port", style="green")
|
|
30
|
+
table.add_column("Protocol", style="cyan")
|
|
31
|
+
|
|
32
|
+
for container in containers:
|
|
33
|
+
ports = container.ports
|
|
34
|
+
name = container.name
|
|
35
|
+
image = container.image.tags[0] if container.image.tags else container.image.short_id
|
|
36
|
+
|
|
37
|
+
if not ports:
|
|
38
|
+
table.add_row(name, image, "-", "-", "-")
|
|
39
|
+
continue
|
|
40
|
+
|
|
41
|
+
for container_port, bindings in ports.items():
|
|
42
|
+
port_num, protocol = container_port.split("/") if "/" in container_port else (container_port, "tcp")
|
|
43
|
+
if bindings:
|
|
44
|
+
for binding in bindings:
|
|
45
|
+
host_port = binding.get("HostPort", "-")
|
|
46
|
+
table.add_row(name, image, host_port, port_num, protocol)
|
|
47
|
+
else:
|
|
48
|
+
table.add_row(name, image, "not bound", port_num, protocol)
|
|
49
|
+
|
|
50
|
+
console.print()
|
|
51
|
+
console.print(table)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dockops
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A developer CLI for common Docker tasks
|
|
5
|
+
Author-email: Akhil <you@email.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Akhil
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/akhilpr7/dockops
|
|
29
|
+
Keywords: docker,cli,devops
|
|
30
|
+
Requires-Python: >=3.8
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
License-File: LICENSE
|
|
33
|
+
Requires-Dist: click>=8.0
|
|
34
|
+
Requires-Dist: rich>=13.0
|
|
35
|
+
Requires-Dist: docker>=6.0
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# dockerkit 🐳
|
|
39
|
+
|
|
40
|
+
A developer CLI for common Docker tasks — clean, scaffold, inspect.
|
|
41
|
+
|
|
42
|
+

|
|
43
|
+

|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install dockerkit
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Commands
|
|
57
|
+
|
|
58
|
+
### `dockerkit clean`
|
|
59
|
+
Remove stopped containers, dangling images, unused volumes and networks in one shot.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
dockerkit clean # with confirmation prompt
|
|
63
|
+
dockerkit clean --force # skip confirmation
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### `dockerkit ports`
|
|
68
|
+
See all ports in use and which container owns them.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
dockerkit ports
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### `dockerkit health`
|
|
77
|
+
View health status, uptime, CPU%, and memory of all running containers.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
dockerkit health # running containers only
|
|
81
|
+
dockerkit health --all # include stopped containers
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Requirements
|
|
87
|
+
|
|
88
|
+
- Python 3.8+
|
|
89
|
+
- Docker running locally
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
dockops/__init__.py
|
|
5
|
+
dockops/cli.py
|
|
6
|
+
dockops.egg-info/PKG-INFO
|
|
7
|
+
dockops.egg-info/SOURCES.txt
|
|
8
|
+
dockops.egg-info/dependency_links.txt
|
|
9
|
+
dockops.egg-info/entry_points.txt
|
|
10
|
+
dockops.egg-info/requires.txt
|
|
11
|
+
dockops.egg-info/top_level.txt
|
|
12
|
+
dockops/commands/__init__.py
|
|
13
|
+
dockops/commands/clean.py
|
|
14
|
+
dockops/commands/health.py
|
|
15
|
+
dockops/commands/ports.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dockops
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dockops"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A developer CLI for common Docker tasks"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
authors = [{ name = "Akhil", email = "you@email.com" }]
|
|
12
|
+
requires-python = ">=3.8"
|
|
13
|
+
dependencies = [
|
|
14
|
+
"click>=8.0",
|
|
15
|
+
"rich>=13.0",
|
|
16
|
+
"docker>=6.0",
|
|
17
|
+
]
|
|
18
|
+
keywords = ["docker", "cli", "devops"]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
dockops = "dockops.cli:main"
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Homepage = "https://github.com/akhilpr7/dockops"
|
dockops-0.1.0/setup.cfg
ADDED