Skip to content

Commit

Permalink
added --command flag to "run docker" to run a specific command such as
Browse files Browse the repository at this point in the history
ck run docker:xyz --command="ck show env"
  • Loading branch information
gfursin committed May 27, 2021
1 parent 6b583c0 commit 0d1ab11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
* V2.4.0.1
* added --bash to docker:module to run bash in a container
* removed outdated and unnecessary files
* added --command flag to "run docker" to run a specific command such as
ck run docker:xyz --command="ck show env"

* V2.4.0
* added module "docker.template" to support adaptive CK containers
Expand Down
7 changes: 6 additions & 1 deletion ck/repo/module/docker/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def run(i):
Input: {
data_uoa - CK entry with Docker description
(scenario) - scenario to get CMD (default if empty)
(cmd) - extra CMD
(command) - extra CMD (at the beginning of the docker command)
(cmd) - extra CMD (at the end of the docker command)
(bash) - if 'yes', add "bash" at the end of CMD
}
Expand Down Expand Up @@ -280,6 +281,10 @@ def call(i):
if i.get('bash','')=='yes':
c+=' bash'

if i.get('command','')!='':
# c+=' "'+i['command']+'"'
c+=' "'+i['command']+'"'

c='docker '+func+' '+c

# Update vars from input
Expand Down

0 comments on commit 0d1ab11

Please sign in to comment.