I'm building a container using
test_container = (
dag.container()
.build(context=source, dockerfile=await dockerfile.name())
Then passing it to
code_exec_result: CodeSolution = await check_code_execution(
test_container=test_container,
reporter=self.plugin,
code_solution=code_solution,
config=self.config,
)
To then add a file to it like so
contents = f"{code_solution.modules[0].imports}\n{code_solution.modules[0].code}"
print(yellow(f"Writing source content: \n{contents}\n\n"))
return (
await test_container.with_new_file(f"/tests/{path}", contents)
.with_exec(["bash", "-c", command])
.sync()
)
The file is nowhere to be found. Why?