Having a little difficulty configuring remote dock...
# pulumi-deployments
t
Having a little difficulty configuring remote docker builders in p-deploy. Are there restrictions around egresss / any guidance related to making connections to external docker builders?
f
hm would you provide a bit more info about the config issue you're experiencing? do you mean using https://www.pulumi.com/blog/docker-build/ and https://docs.docker.com/build/drivers/remote/ or something else?
t
Yeah, specifically that within the context of a pulumi-hosted deployment runner
f
thanks. hm yeah, i can't think of anything offhand - are you getting a specific error? a timeout? etc
t
Yeah, it's
context deadline exceeded
which makes sense if the client never reaches the server, though I instantiate the builder with
--bootstrap
, which should verify the connection
f
i know it's not ideal but it could be timing out on resource creation? maybe try increasing that first? https://www.pulumi.com/docs/concepts/options/customtimeouts/
t
I don't think so - it's happening while waiting for the docker build to start
f
yeah, hmmmm.
t
If it's at all helpful, the same stack/builder combination works locally just fine.
h
what commands are you running to setup the builder?
t
This is what I have in the
Pre-run commands
block:
pulumi env run <stack-name> -i -- sh -c 'docker buildx create --name <builder-name> --driver remote --driver-opt <redacted-args> --bootstrap <url>'
h
this is a stab in the dark but iirc deployments uses an older version of docker (not sure which one,
docker --version
in a pre-run command would tell you). to rule out whether this is a docker issue you might try downgrading locally to see if it still works for you. like for example it might be old enough that
--bootstrap
doesn’t do anything (https://github.com/docker/buildx/pull/1103)
t
Ah interesting. Would another easy way to test be to just add a sleep after that command? Or will deployments not block on sleep?
h
nah it’ll sleep just fine
🤘 1
t
Yeah that seems to not do anything. Similar for other commands of the sort. It actually looks like docker's quite new:
Docker version 27.1.1, build 6312585
👍 1
Oh wait - I think I know what's going on. Are the tempfiles that esc injects into the environment injected to a stable location?
Aha, yeah that's the issue - We configure the builder with the locations of tempfiles which are then re-mounted somewhere else. I should just store the tempfiles somewhere locally first.
💡 2
IT LIIIIVES - thanks @hallowed-photographer-31251! Sorry it took me so long to get back to this but couldn't appreciate your help more 🙂
h
ha no problem glad you got to the bottom of it! using a remote builder is a great way to get some shared caching that just kinda works
t
Also gets around the disk limitations on pulumi runners 🙂 The machines we're using are a tad beefier lol
💯 1