https://dagster.io/ logo
Title
a

Alexey Zavalskiy

04/17/2023, 11:21 AM
Hi! I'm using
execute_docker_container()
to run some code outside dagster code location in op. Is it possible to catch result from such op (or maybe
docker_container_op()
) and pass it to next op? Reffering to https://docs.dagster.io/_modules/dagster_docker/ops/docker_container_op#execute_docker_container, such op can only print container result to stdout.
d

daniel

04/17/2023, 2:10 PM
Hi Alexey -
execute_docker_container
is a function that's intended to be called within an op that you write, so anything you can do within a normal op, you should be able to do with an op that calls
execute_docker_container
a

Alexey Zavalskiy

04/17/2023, 2:51 PM
Yes, i understand. Question was not correct. I mean, can i get output (stdout, stderr) of container and pass it to next op?
d

daniel

04/17/2023, 3:05 PM
Ah I see. Not currently but I bet you could modify the function, it's a pretty thin layer on top of the Docker python API: https://github.com/dagster-io/dagster/blob/master/python_modules/libraries/dagster-docker/dagster_docker/ops/docker_container_op.py#L76-L141
a

Alexey Zavalskiy

04/17/2023, 3:14 PM
Well, i think this will work for me, thanks!