dih 0.0.1.4

Creator: bradpython12

Last updated:

Add to Cart

Description:

dih 0.0.1.4

DIH: Docker Image Handler
A tool to save and load the docker image tarball file.










Requirements

python >=3.8
Virtualenv, VirtualenvWrapper

Install module with PyPI
mkvirtualenv dih
pip install dih

Load docker image with tarball file


Load docker image with specific folder or file
dih load -f ./archives



Load docker image with manual selection
dih load -f ./archives --select


Sample




Enter the index of the docker images...





Load docker image with specific folder and verify with compose file.
dih load -f ./archives -c <path/to/compose>


Sample




Verify with compose file and only load the verified indexes...





Save docker image into tarball file


Save docker image into tarball file.
dih save -f ./archives



Filter with specific rule, includes something and excludes something.
dih save -f ./archives -inc innodisk -exc none


Sample




dih save -f ./archives -inc rtsp -exc none...





More detail

dih load --help
Usage: dih load [OPTIONS]

Options:
-f, --folder PATH Path to the folder. [required]
-c, --compose-file PATH Path to compose file.
-s, --select Select by index.
--debug Only display the information.
--help Show this message and exit.


dih save --help
Usage: dih save [OPTIONS]

Options:
-f, --folder TEXT Path to the folder. [required]
-inc, --includes TEXT Include keys.
-exc, --excludes TEXT Exclude keys.
--debug Only display the information.
--help Show this message and exit.



For Local Developer

Requirements

python 3.10
Virtualenv, VirtualenvWrapper


Usage
mkvirtualenv dih
pip install -r requirements.txt



For Developer ( Docker )

Requirements

Docker engine


Usage

Help
Usage: ./docker/handler.sh [mode] [ubuntu] [command]

Options:
- mode: build|run
- ubuntu: focal|20.04|jammy|22.04
- command: only supported when 'handler.sh run'. e.g."bash"


For example
# Build docker image
./docker/handler.sh build focal
# Run docker container with specific version and command
./docker/handler.sh run focal "bash"





Testing
pytest -v
pytest --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html

Distribute
python3 -m pip install --upgrade build
sudo apt install python3.10-venv
python3 -m build
twine upload dist/*

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.