Skip to main content

Tools for inspecting contents of docker container filesystem.

Project description

containerutil.Path provides API similar to pathlib.Path for inspecting docker container file system:

import docker
import containerutil

client = docker.from_env(version='auto')
ctnr = client.containers.get('my-container')

p = containerutil.Path(ctnr, '/foo/bar/path')

p.exists()        # True if file exists (regardless of type)
p.is_file()       # True if file exists and is a regular file
p.is_symlink()    # True if file exists and is a symbolic link
p.is_fifo()       # True if file is a named pipe (FIFO)

Installation

From PyPI using pip package manager:

pip install --upgrade containerutil

Or install the latest sources from GitHub:

pip install https://github.com/pavdmyt/containerutil/archive/master.zip

Development

Clone the repository:

git clone https://github.com/pavdmyt/containerutil.git

Install dependencies:

make install

Lint code:

make lint

Run tests:

make test

Contributing

  1. Fork it!

  2. Create your feature branch: git checkout -b my-new-feature

  3. Commit your changes: git commit -m 'Add some feature'

  4. Push to the branch: git push origin my-new-feature

  5. Submit a pull request

  6. Make sure tests are passing

License

MIT - Pavlo Dmytrenko

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

containerutil-0.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

containerutil-0.2.0-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file containerutil-0.2.0.tar.gz.

File metadata

File hashes

Hashes for containerutil-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fb9dcaabacc52364a5f47e30ca6d165f96b8907c38c6eaba7d915a999fd179cc
MD5 8b54961f5c861c8e7b5e1b6fd8d54395
BLAKE2b-256 4cde224af5b768bb542f1fe222788e06f751ebf430fd1260cdb01f4a4cdcdad3

See more details on using hashes here.

File details

Details for the file containerutil-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for containerutil-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 53070e03a830ffe488208d9d14ba74faf089eccae684cd092183103819df34af
MD5 d2905da88cb87c7b6995be702d5aa694
BLAKE2b-256 85411ea645bd7778c4eda321da199c696ecc0ff85923c56be5f88eea68fdf709

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