Skip to main content

A small Python utility that tries to check if we are inside a Docker container.

Project description

docker-check

A small Python utility that tries to check if we are inside a Docker container.

Supports Linux and Windows containers.

Installation

pip install -e git+https://github.com/night-crawler/docker-check.git@HEAD#egg=docker-check
# OR
pip install docker-check

Usage

from docker_check import checker
if checker.is_inside_container():
    print('Inside container')
else:
    print('Not inside container')

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

docker-check-0.0.3.tar.gz (3.6 kB view hashes)

Uploaded source

Built Distribution

docker_check-0.0.3-py2.py3-none-any.whl (2.4 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page