Correct use of from_dockerfile context manager
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import cursorius.executors.docker as docker
|
||||
|
||||
print("hello, world from python (#1)")
|
||||
d = docker.DockerBuilder.from_dockerfile("builder", "Dockerfile")
|
||||
print(d.run("/main"))
|
||||
with docker.DockerBuilder.from_dockerfile("builder", "Dockerfile") as d:
|
||||
print(d.run("/main"))
|
||||
print("hello, world from python (#2)")
|
||||
|
||||
Reference in New Issue
Block a user