moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
8.17k stars 1.16k forks source link

Can't auth using --addr kube-pod://buildkitd-0 #3767

Open sfxworks opened 1 year ago

sfxworks commented 1 year ago

I can push just fine using just podman

sfxworks@penguin:~/alpaca-lora$ sudo podman pull docker.io/alpine
Trying to pull docker.io/library/alpine:latest...
Getting image source signatures
Copying blob f56be85fc22e done  
Copying config 9ed4aefc74 done  
Writing manifest to image destination
Storing signatures
9ed4aefc74f6792b5a804d1d146fe4b4a2299147b0f50eaf2b08435d7b38c27e
sfxworks@penguin:~/alpaca-lora$ sudo podman tag 9ed4aefc74f6792b5a804d1d146fe4b4a2299147b0f50eaf2b08435d7b38c27e docker.io/quantomworks/alpine
sfxworks@penguin:~/alpaca-lora$ sudo podman push docker.io/quantomworks/alpine
Getting image source signatures
Copying blob f1417ff83b31 skipped: already exists  
Copying config 9ed4aefc74 done  
Writing manifest to image destination
Storing signatures

But if I use buildkitd with a k8s pod, I get an auth error

sfxworks@penguin:~/alpaca-lora$ sudo buildctl --addr kube-pod://buildkitd-0 build --frontend=dockerfile.v0  --local context=. --local dockerfile=. --output type=image,name=docker.io/quantomworks/alpaca-lora:latest,push=true   --export-cache type=registry,ref=docker.io/quantomworks/alpaca-lora:buildcache   --import-cache type=registry,ref=docker.io/quantomworks/alpaca-lora:buildcache
[+] Building 30.8s (12/12) FINISHED                                                                                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                                                                                               0.1s
 => => transferring dockerfile: 684B                                                                                                                                                                               0.1s
 => [internal] load metadata for docker.io/nvidia/cuda:11.8.0-devel-ubuntu22.04                                                                                                                                    0.3s
 => [internal] load .dockerignore                                                                                                                                                                                  0.1s
 => => transferring context: 82B                                                                                                                                                                                   0.1s
 => ERROR importing cache manifest from docker.io/quantomworks/alpaca-lora:buildcache                                                                                                                              0.1s
 => [1/6] FROM docker.io/nvidia/cuda:11.8.0-devel-ubuntu22.04@sha256:9ac394082aed016f825d89739ae691a51ab75f7091154ec44b68bc8c07a6f2e6                                                                              0.0s
 => => resolve docker.io/nvidia/cuda:11.8.0-devel-ubuntu22.04@sha256:9ac394082aed016f825d89739ae691a51ab75f7091154ec44b68bc8c07a6f2e6                                                                              0.0s
 => [internal] load build context                                                                                                                                                                                  0.1s
 => => transferring context: 2.71kB                                                                                                                                                                                0.1s
 => CACHED [2/6] RUN apt-get update && apt-get install -y     git     curl     software-properties-common     && add-apt-repository ppa:deadsnakes/ppa     && apt install -y python3.10     && rm -rf /var/lib/ap  0.0s
 => CACHED [3/6] WORKDIR /workspace                                                                                                                                                                                0.0s
 => CACHED [4/6] COPY requirements.txt requirements.txt                                                                                                                                                            0.0s
 => CACHED [5/6] RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10     && python3.10 -m pip install -r requirements.txt     && python3.10 -m pip install numpy --pre torch --force-reinstall --index  0.0s
 => [6/6] COPY . .                                                                                                                                                                                                19.9s
 => ERROR exporting to image                                                                                                                                                                                      10.1s
 => => exporting layers                                                                                                                                                                                            9.1s
 => => exporting manifest sha256:68e610bf7abe88c1982a54f9d44852b6eae15bcdcfcf252084c42d965c92b49c                                                                                                                  0.5s
 => => exporting config sha256:7a3a9abf797777f5217cc6044d2e7549d8121e2943abc07b41deb7021bea1e62                                                                                                                    0.0s
 => => pushing layers                                                                                                                                                                                              0.5s
------
 > importing cache manifest from docker.io/quantomworks/alpaca-lora:buildcache:
------
------
 > exporting to image:
------
error: failed to solve: failed to push docker.io/quantomworks/alpaca-lora:latest: push access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
JPBFRCA3 commented 1 year ago

I don't want the digital voice service please delete

sfxworks commented 1 year ago

What?