def delete_container(container_id):
    container = Containers.query.filter_by(id=container_id).first_or_404()
    if delete_image(container.name):
        db.session.delete(container)
        db.session.commit()
        db.session.close()
    return '1'
Beispiel #2
0
def delete_container(container_id):
    container = Containers.query.filter_by(id=container_id).first_or_404()
    if delete_image(container.name):
        db.session.delete(container)
        db.session.commit()
        db.session.close()
    return '1'