'The docker API will take a volumes argument in many formats, try to
deal with that for the command line'

def _stringify_kwopt_docker_volumes(self, flag, val):

    l = []
    if isinstance(val, list):
        l = val
    else:
        for (hostvol, guestopts) in val.items():
            if isinstance(guestopts, string_types):
                l.append('{}:{}'.format(hostvol, guestopts))
            else:
                mode = guestopts.get('mode', '')
                l.append('{vol}:{bind}{mode}'.format(vol=hostvol, bind=guestopts['bind'], mode=((':' + mode) if mode else '')))
    return self._stringify_kwopt_list(flag, l)
