A tool to save and load the docker image tarball file
Project description
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"
- Help
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/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dih-0.0.1.4.tar.gz
(15.7 kB
view hashes)
Built Distribution
dih-0.0.1.4-py3-none-any.whl
(13.0 kB
view hashes)