Hey peeps! Pantsbuild no longer wants build Docker...
# general
f
Hey peeps! Pantsbuild no longer wants build Docker images, and just returns this strange message from Docker which I cannot figure out with googling. Any help?
1
e
I have not seen anything like it either but surface googling says it would be good to see
docker context ls
output as a start as well as what
DOCKER_*
env vars you normally have set in your environment vs what
DOCKER_*
env vars you explicitly punch through Pants via
pants.toml
and/or
BUILD
files.
f
Hey John! Thank you for reaching out so quickly, much appreciated.
image.png
image.png
I am on pants 2.16. Not passing in anything else to Docker methinks.
I can try explicating the DOCKER_CONTEXT by using env variables, just waiting for a build to finish.
I recently updated Docker, not sure if that is what's causing this. I cannot think of any other change that could have caused this to start happening.
e
Ok. One thing to point out, screen shots are extremely support unfriendly since text is unselectable.
f
Ah, that's a good point. Do you want me to repost the above or is it OK?
e
But clearly try poking through
DOCKER_HOST=...
That default value.
Since the default is not the default per your
ls
output.
f
Aha, good point! I'll try that and get back to you.
Alright, it works now! What fixed is was setting the docker context back to default using
docker context use default
. I am not super familiar with Docker contexts, so I'm not sure why this would cause an issue. But there's your fix for the next person with the same problem!
n
Also just hit this. Pasting the error for future search.
Copy code
ERROR: use `docker --context=default buildx` to switch to context "default"
Reproducible with example-docker repo by running
pants package src/docker/hello_world:shell
. Will dig into it some more.
🙌 1