def run_container(container_id):
    container = Containers.query.filter_by(id=container_id).first_or_404()
    if container_status(container.name) == 'missing':
        if run_image(container.name):
            return '1'
        else:
            return '0'
    else:
        if container_start(container.name):
            return '1'
        else:
            return '0'
Beispiel #2
0
def run_container(container_id):
    container = Containers.query.filter_by(id=container_id).first_or_404()
    if container_status(container.name) == 'missing':
        if run_image(container.name):
            return '1'
        else:
            return '0'
    else:
        if container_start(container.name):
            return '1'
        else:
            return '0'