Is it possible to have pulumi build a docker image...
# general
a
Is it possible to have pulumi build a docker image from an enclosing directory? I am trying the following but getting errors:
Copy code
image: awsx.ecs.Image.fromDockerBuild("test", {
          context: "../",
          dockerfile: "docker/prod/Dockerfile"
        }),
Error is
error: unable to prepare context: unable to evaluate symlinks in Dockerfile path:
. My pulumi code is in a subfolder of my source code directory.
w
Are there any symlinks involved in the paths here? I’ve not seen this specific error before, even in cases where things are structured generally like you describe here. Are you able to successfully run the equivalent
docker build
command directly?
a
@white-balloon-205 Thanks I figured it out by trying to docker build directly like you said, there are no symlinks involved, but the path in
dockerfile
should be
../docker/prod/Dockerfile
,
../
needs to be pre-pended.
👍 1