def exec(container, command, out=True):
    """
    Run one or more commands inside a docker container.

    Paremters
    ---------
    container : docker container
    command : str or list of commands. Multiple commands are joined with ' && '
    out : print the output from running the commands
    """
    # convert to list
    if not isinstance(command, list):
        command = [command]

    # run the command
    command = ' && '.join(command)
    result = container.exec_run(f"sh -c '{command}'")

    # show the
    if out:
        print(result.output.decode())

    return result.exit_code, result.output.decode()