Hi! Any built in support for docker’s cloud builde...
# general
w
Hi! Any built in support for docker’s cloud builder? E.g. I can do
Copy code
docker buildx build <https://github.com/dockersamples/buildme.git> --builder cloud-integrateai-integrateai
and it will use their remote build feature https://build.docker.com/ as a stopgap I was trying to see if it can use it globally, e.g.
Copy code
docker buildx use cloud-integrateai-integrateai --global
But this doesn’t seem picked up by pants. Note this seems to modify the
buildx
config
Copy code
$ cat ~/.docker/buildx/current 
{"Key":"unix:///var/run/docker.sock","Name":"cloud-integrateai-integrateai","Global":true}
b
Sorry for the trouble. Could you share your
pants.toml
particularly any docker sections? Related to that, have you set the
use_buildx
option?
w
I missed that! it’s working now, as long as i set global flag.
Prett transparent! Handy.
t
Can you show a use case? I am wondering how the build cloud would have access to PEX files for example built by pants, which are part of a Dockerfile.
@wonderful-boots-93625 Also, it looks like you have experiences with depot.dev as well. What are your experiences with both using pants?
w
So, depot.dev requires a bunch of shimming to make it work, it ended up being a bit too much. docker cloud is more promising since it works with minimal changes (but i’ve only been using it for a few days)
but depot.dev is pretyt good - just too bad integration is too taxing
I imagine pex is built locally before being pushed to cloud to build
like everything else in the build context
t
@wonderful-boots-93625 Were you able to use depot.dev at all with pants? If so, could you share the details of the shimming? Wondering if using https://depot.dev/docs/guides/docker-build#how-to-use-depot-with-docker is not all one needs?!
w
So I had to do a bunch of things, it got a bit complicated. Then docker released this - and it basically works out of the box and so there’s not much need to use depot.dev. Is there a reason you want to use depot.dev instead? some discussion here: https://pantsbuild.slack.com/archives/C046T6T9U/p1680209250680309 - I’ll paste my shim there when I get a chance.
t
Been thinking about trying the GHA runners from depot.dev as well and that would be a good fit doing both things there
w
Yea thats another option - to do the docker build outside pants, and just have pants prepare artifacts