Skip to main content

A tool to save and load the docker image tarball file

Project description

cover

DIH: Docker Image Handler

A tool to save and load the docker image tarball file.

GitHub License GitHub Workflow Status (with event) GitHub tag checks state GitHub issues

Codecov PyPI - Version PyPI - Python Version PyPI - Downloads PyPI - Status

Requirements

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

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/*

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 details)

Uploaded Source

Built Distribution

dih-0.0.1.4-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file dih-0.0.1.4.tar.gz.

File metadata

  • Download URL: dih-0.0.1.4.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for dih-0.0.1.4.tar.gz
Algorithm Hash digest
SHA256 de3ef98676ebd2ba98402770e10eb483c2b0b99a4f7da0da2f928cf24375f4f2
MD5 ddd95d9f77aeac7e2c393d173ff5c489
BLAKE2b-256 cb7024370e42745b1b2b6f4c9d14499f23d94a5f14ab2b8869fde3cd48718998

See more details on using hashes here.

File details

Details for the file dih-0.0.1.4-py3-none-any.whl.

File metadata

  • Download URL: dih-0.0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for dih-0.0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ebc3b4cd85b4b9a34dff9a06ac495f4b877f9c7d909ace8180cdf7eee6854035
MD5 89e0b35366b174a2e86309c8f820f932
BLAKE2b-256 d27b5f4149e4311a2084664a56257fda563d59c1d14b1341f95b4fdc31281323

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page