Hello, i try to run an image db2 on a container with Kaniko. I pull my image on . . .

Mehdi AZZI:
Hello, i try to run an image db2 on a container with Kaniko. I pull my image on a personal harbor

this is my command

sudo docker run -v /container/db2:/workspace \
<http://my-harbor.my-developments.com/library/kaniko:1.8.1|my-harbor.my-developments.com/library/kaniko:1.8.1> \
--context dir:///workspace/ \
--dockerfile /workspace/Containerfile \
--no-push

But i got this error

error building image: GET <https://my-harbor.my-developments.com/v2/consulting/db2/db2/manifests/1.0.0>: UNAUTHORIZED: unauthorized to access repository: consulting/db2/db2, action: pull: unauthorized to access repository: consulting/db2/db2, action: pull

this is the first line of my Containerfile
FROM <http://my-harbor.my-developments.com/consulting/db2/db2:1.0.0|my-harbor.my-developments.com/consulting/db2/db2:1.0.0>

In local if i try to connect docker login <http://my-harbor.my-developments.com|my-harbor.my-developments.com> i got Login Succeeded

Why i can’t connect to my harbor registry since my container ?

Al West:
When you do docker login on your local machine, Docker authenticates against the registry and stores it in ~/.docker/config.json. The Kaniko container isn’t using this config file.

Mehdi AZZI:
mmh ok, i retry now its working