Skip to content
GitLab
Menu
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
fd9b9e03
Commit
fd9b9e03
authored
Mar 22, 2016
by
Ernesto Rodriguez Ortiz
Browse files
Keep the task copy_public_ssh_keys.
We need this task to make fabric run tasks into the container.
parent
e1e36cfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
docker.py
View file @
fd9b9e03
...
...
@@ -122,6 +122,7 @@ def image_create(role='local'):
if
'{}/drupal'
.
format
(
env
.
project_name
)
in
docker_images
():
print
(
red
(
'Docker image {}/drupal was found, you has already build this image'
.
format
(
env
.
project_name
)))
else
:
h
.
_copy_public_ssh_keys
(
role
)
h
.
fab_run
(
role
,
'docker build -t {}/drupal .'
.
format
(
env
.
project_name
))
print
(
green
(
'Docker image {}/drupal was build successful'
.
format
(
env
.
project_name
)))
...
...
helpers.py
View file @
fd9b9e03
...
...
@@ -188,6 +188,18 @@ def hook_execute(hook, role='docker'):
with
fab_cd
(
role
,
env
.
docker_site_root
):
fab_run
(
role
,
cmd
)
def
_copy_public_ssh_keys
(
role
=
'local'
):
"""
Copy your public SSH keys to use it in the docker container to connect to it using ssh protocol.
:param role Default 'role' where to run the task
"""
set_env
(
role
)
with
fab_cd
(
role
,
WORKSPACE
):
fab_run
(
role
,
'cp ~/.ssh/id_rsa.pub conf/'
)
print
(
green
(
'Public SSH key copied successful'
))
def
_update_profile
(
role
=
'local'
):
"""
Update or clone the installation profile specified in the configuration file.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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