Commit 722a8c88 authored by Samuel Sirois's avatar Samuel Sirois

Add docker.clean command

parent f8fee175
......@@ -2,6 +2,7 @@ from __future__ import unicode_literals
from fabric.api import task, roles, env, local, run, lcd
from fabric.colors import red, green
from fabric.contrib.console import confirm
import helpers as h
......@@ -220,6 +221,21 @@ def image_remove():
print(red('Docker image {}/drupal was not found'.format(env.project_name)))
@task
@roles('local')
def clean():
"""
Clean docker workspace
"""
if (confirm(
red('This will stop, remove container and delete docker image ' +
'related to this project. Do you want to continue?'),
default=False)):
container_stop()
container_remove()
image_remove()
@task
@roles('docker')
def update_host():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment