You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
650 B
26 lines
650 B
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,
|
|
)
|
|
|