<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def shell(cmd):
    "Simple wrapper for calling docker, returning None on error and the output on success"
    try:
        return subprocess.check_output(['docker'] + cmd, stderr=subprocess.STDOUT).decode('utf8').strip()
    except subprocess.CalledProcessError:
        return None