3 changed files with 35 additions and 0 deletions
@ -0,0 +1,26 @@ |
|||
def _docker_hello_world(ctx): |
|||
ctx.actions.write( |
|||
output = ctx.outputs.executable, |
|||
is_executable = True, |
|||
content = "docker run hello-world") |
|||
return DefaultInfo(executable = ctx.outputs.executable) |
|||
|
|||
|
|||
docker_hello_world = rule( |
|||
implementation = _docker_hello_world, |
|||
executable = True, |
|||
) |
|||
|
|||
|
|||
def _docker_ubuntu_bash_interactive(ctx): |
|||
ctx.actions.write( |
|||
output = ctx.outputs.executable, |
|||
is_executable = True, |
|||
content = "docker run -it ubuntu bash") |
|||
return DefaultInfo(executable = ctx.outputs.executable) |
|||
|
|||
|
|||
docker_ubuntu_bash_interactive = rule( |
|||
implementation = _docker_ubuntu_bash_interactive, |
|||
executable = True, |
|||
) |
|||
Loading…
Reference in new issue