Hi all. I am getting an error testing out docker f...
# general
c
Hi all. I am getting an error testing out docker functionality.
Copy code
#3 [internal] load metadata for <http://docker.io/library/python:3.8|docker.io/library/python:3.8>
#3 sha256:edad251955f644c6004999f0af04035912392fa02db26821676452becbc715fb
[2023-01-28T15:31:23.094439000Z][docker-credential-desktop][F] get system info: exit status 127
[goroutine 1 [running, locked to thread]:
[common/pkg/system.init.0()
[       common/pkg/system/os_info.go:32 +0x29d
#3 ERROR: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: ``
------
 > [internal] load metadata for <http://docker.io/library/python:3.8|docker.io/library/python:3.8>:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: ``
I was following the errors it showed for env variables and tools. Currently have this in my pants.toml
Copy code
```
[docker]
env_vars = [
  "HOME",
  "USER",
]

tools = ["sh", "sw_vers"]
```
Not really sure where to go next. For reference, the image I am building is this:
Copy code
FROM python:3.8

RUN python3 -c "print('Hello world from docker')"
c
I suspect that your docker credentials plugin is not available on the hermetic PATH used by pants. Is
docker-credential-desktop
an executable? If so, and if that’s the credentials plugin, it’s path needs to be on the PATH availabe to pants processes.
c
it is an executable. I added it as well to
tools
. Still getting the same error.
Hmm. by adding
PATH
to
env_vars
I was able to build the image. Not sure if its a good idea…
Its seems to be working. is having
PATH
in env vars a good idea?
k
For future reference: I’m running macOS and had to add`osascript` in addition to
sh
and
sw_vers
to run docker using
docker-credentials-desktop
as credentials manager.