Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
722a8c88
Commit
722a8c88
authored
Nov 07, 2016
by
Samuel Sirois
Browse files
Add docker.clean command
parent
f8fee175
Changes
1
Hide whitespace changes
Inline
Side-by-side
docker.py
View file @
722a8c88
...
...
@@ -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
():
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment