Does anyone have any insight into running a shell ...
# general
f
Does anyone have any insight into running a shell based tool after a docker image is created? I’m having issues when the first time I run this code that the shell.exec command is running before the actual image is actually built. When I do pulumi up(before saying yes to applying) and I my shell.exec command fails saying the image doesn’t exist. But I know it does because if run docker images I can see it. To me it must be the async nature of the code. The docker build must be firing off and my shell.exec all at the same time. Being the shell.exec is faster it finishes first and the error happens. This may be me just coming to terms with nodejs code.
d
I’m seeing something similar with a Kubernetes deployment that depends on a docker image. The deployment is created before the image is built and pushed. Seems like a bug. https://github.com/pulumi/pulumi-docker/issues/18
f
In my example I don’t have dependency between my shell.exec and the pulumi docker resource. I’m guessing if I pu my shell.exec into a custom resource and said it depends on the image2 I would run into your bug.
So maybe my question is, is there a way to put a dependency on normal nodejs(shell.exec) code and a pulumi resource(image2)?