cwltool.docker_id
Helper functions for docker.
Functions
Return the User ID and Group ID of the default docker user inside the VM. |
|
Pass a command list to |
|
Get the machine name of the active docker-machine machine. |
|
|
Run a command and compares output to expected. |
Check if boot2docker CLI reports that boot2docker vm is running. |
|
Ask docker-machine for the active machine and checks if its VM is running. |
|
|
Run the provided command and returns the integer value of the result. |
Get the UID and GID of the docker user inside a running boot2docker vm. |
|
Ask docker-machine for active machine and gets the UID of the docker user. |
Module Contents
- cwltool.docker_id.docker_vm_id()
Return the User ID and Group ID of the default docker user inside the VM.
When a host is using boot2docker or docker-machine to run docker with boot2docker.iso (As on Mac OS X), the UID that mounts the shared filesystem inside the VirtualBox VM is likely different than the user’s UID on the host. :return: A tuple containing numeric User ID and Group ID of the docker account inside the boot2docker VM
- cwltool.docker_id.check_output_and_strip(cmd)
Pass a command list to
subprocess.check_output()
.Returning None if an expected exception is raised :param cmd: The command to execute :return: Stripped string output of the command, or
None
if error
- cwltool.docker_id.docker_machine_name()
Get the machine name of the active docker-machine machine.
- Returns:
Name of the active machine or
None
if error- Return type:
Optional[str]
- cwltool.docker_id.cmd_output_matches(check_cmd, expected_status)
Run a command and compares output to expected.
- cwltool.docker_id.boot2docker_running()
Check if boot2docker CLI reports that boot2docker vm is running.
- Returns:
True
if vm is running,False
otherwise- Return type:
- cwltool.docker_id.docker_machine_running()
Ask docker-machine for the active machine and checks if its VM is running.
- Returns:
True
if vm is running,False
otherwise- Return type:
- cwltool.docker_id.cmd_output_to_int(cmd)
Run the provided command and returns the integer value of the result.
- cwltool.docker_id.boot2docker_id()
Get the UID and GID of the docker user inside a running boot2docker vm.