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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for containerutil, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size containerutil-0.2.0-py2.py3-none-any.whl (5.3 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size containerutil-0.2.0.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page