Hi all! I'm getting the following error when runni...
# general
s
Hi all! I'm getting the following error when running
./pants package
on a
docker_image
target:
Copy code
#3 [internal] load metadata for <http://docker.io/library/python:3.9.10|docker.io/library/python:3.9.10>
#3 sha256:46aa02c10fee7f9ebc6cc466be0c44172ff37ff4dd662dc045c92c93ba51e3fe
#3 ERROR: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: `One or more parameters passed to a function were not valid.`
has anyone ran into this issue?
searching
One or more parameters passed to a function were not valid
looks like it has something to do with ssl certificates in macs
weird thing is that using docker directly works totally fine
c
nothing I recognize, but seems to be related to a docker auth plugin. Does it work when you run docker outside of pants? If so, it’s likely some missing env var/PATH needed for the pants docker configuration that needs to be set in order for the auth plugin to work.
it can be a bit of a pain to track down/identify precisely what is required..
s
thank you!!
adding
Copy code
[docker]
env_vars = ["DOCKER_CONFIG=%(homedir)s/.docker"]
to
pants.toml
solved the issue
💯 1
weird that I have to do this though, since that's the default location
c
Then maybe the notion of the current user/home dir is not specified when running Docker from pants..
But happy you were able to solve it 👍
f
if neither
XDG_CONFIG_HOME
nor
HOME
is not set in the execution sandbox, docker would not know where to find config file. https://github.com/moby/moby/blob/2400bc66ef6955760a331a2bff767d4fec244844/pkg/homedir/homedir_linux.go#L84-L93
b
If you're ever curious to learn more about sandboxing in Pants, this is a good intro talk about that

https://www.youtube.com/watch?v=0INmW9KaAp4