https://pulumi.com logo
#general
Title
# general
a

adamant-dress-73325

04/15/2019, 7:38 PM
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

white-balloon-205

04/15/2019, 10:39 PM
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

adamant-dress-73325

04/16/2019, 4:19 PM
@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