Asynchronous _Docker management for WSL2 using pywershell
Project description
DockwerShell
Asynchronous _Docker management for Debian-based WSL2 using the [pywershell] engine under the hood.
import asyncio
from dockwershell.core import AsyncDocker
async def main():
# get singleton instance
docker = await AsyncDocker.get()
# print version (auto-installs if needed)
version = await docker.version
print("_Docker version:", version)
# list images
images = await docker.images
print("Available images:", images)
# run an ad‐hoc command
await docker.run("ps -a")
from pathlib import Path
from dockwershell.manager import DockerManager
async def build_and_run():
mgr = DockerManager()
img = await mgr.new(
dockerfile=Path("Dockerfile.app"),
build_args="ENV=prod",
rebuild=False,
run_args="-d -p 8000:8000"
)
result = await img.run()
print(result.str)
asyncio.run(build_and_run())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dockwershell-0.5.1.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dockwershell-0.5.1.tar.gz.
File metadata
- Download URL: dockwershell-0.5.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7ede2c07c9e11ae5777ef40264134d946059fc5817b23681016c68dca89c8d3
|
|
| MD5 |
6cb33ffc74bddb4d6d44686aa89857fa
|
|
| BLAKE2b-256 |
4f01fbcd92065998d7a9f64378599dc09d5a423d9bac00d66f377561a1a5a7bd
|
File details
Details for the file dockwershell-0.5.1-py3-none-any.whl.
File metadata
- Download URL: dockwershell-0.5.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a906c2c7856bee3380159aaa5420046ec85bdde39e90e26c94aceb9af96ecd0e
|
|
| MD5 |
6191d7bdac671c6cb54fa9d361d1e31f
|
|
| BLAKE2b-256 |
7e83962faf287e9f865eef80b14b2b09e87ffc311d242307b58b89d5c029ba6e
|