in_docker

Contents

in_docker#

in_docker() bool[source]#

Check if the session is running inside a docker

Returns:

True if inside a docker

Return type:

bool

Example

>>> if in_docker():
>>>    print("OMG we are stock in a Docker ! Get me out of here !")
>>> else:
>>>    print("We are safe")