Closed Cescodeveloper42 closed 2 weeks ago
Hey
Thanks for reporting this. Will have to investigate and I'll come back.
Also, using ghcr.io
seems to have worked
So the problem is related to how login data is fetched from the docker login. For now, as a workaround you can use kraft login
➜ 1.15 git:(main) ✗ kraft pkg push index.docker.io/craciunoiuc/test-nginx-3:latest
D kraftkit 0.8.7
D checking compatibility format=oci source=index.docker.io/craciunoiuc/test-nginx-3:latest
D querying catalog local=true name=index.docker.io/craciunoiuc/test-nginx-3:latest remote=false
i found index.docker.io/craciunoiuc/test-nginx-3:latest (qemu/x86_64) (0e588e0, 31ab06e, qemu/x86_64, 1.9 MB)
D found 1/1 matching packages in oci catalog
i pushing index.docker.io/craciunoiuc/test-nginx-3:latest (qemu/x86_64)
D pushing digest=sha256:31ab06e7c32b5c151fcb679590d6318ff9fec2f0ba5ca5f16752f2bb1a5fd8bc mediaType=application/vnd.oci.image.index.v1+json ref=index.docker.io/craciunoiuc/test-nginx-3:latest
E HEAD https://index.docker.io/v2/craciunoiuc/test-nginx-3/manifests/latest: unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)
E HEAD https://index.docker.io/v2/craciunoiuc/test-nginx-3/manifests/latest: unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)
➜ 1.15 git:(main) ✗ kraft login -u craciunoiuc -t 'REDACTED' index.docker.io
D kraftkit 0.8.7
➜ 1.15 git:(main) ✗ kraft pkg push index.docker.io/craciunoiuc/test-nginx-3:latest
D kraftkit 0.8.7
D checking compatibility format=oci source=index.docker.io/craciunoiuc/test-nginx-3:latest
D querying catalog local=true name=index.docker.io/craciunoiuc/test-nginx-3:latest remote=false
i found index.docker.io/craciunoiuc/test-nginx-3:latest (qemu/x86_64) (0e588e0, 31ab06e, qemu/x86_64, 1.9 MB)
D found 1/1 matching packages in oci catalog
i pushing index.docker.io/craciunoiuc/test-nginx-3:latest (qemu/x86_64)
D pushing digest=sha256:31ab06e7c32b5c151fcb679590d6318ff9fec2f0ba5ca5f16752f2bb1a5fd8bc mediaType=application/vnd.oci.image.index.v1+json ref=index.docker.io/craciunoiuc/test-nginx-3:latest
➜ 1.15 git:(main) ✗
Opened PR with a fix, thanks @Cescodeveloper42
A note though: you will have to use index.docker.io
instead of docker.io
in the login to make it correctly work with Unikraft 🙏
One extra note: you'll have to use staging
as the version to have this, or you can wait till a release
thank you so much guys
Describe the bug
Kraftkit can't push on a private docker hub registry. I have already done the login by using the "docker login" and the "kraft login dockerhub" commands but it didn't take effect
Steps to reproduce
this is the kraftfile configuration:
spec: v0.6
name: redis
rootfs: ./Dockerfile
cmd: ["/usr/bin/redis-server"]
template: source: https://github.com/unikraft/app-elfloader.git version: staging
unikraft: source: https://github.com/unikraft/unikraft.git version: staging kconfig:
Configurations options for app-elfloader
libraries: lwip: source: https://github.com/unikraft/lib-lwip.git version: staging kconfig: CONFIG_LWIP_LOOPIF: 'y' CONFIG_LWIP_UKNETDEV: 'y' CONFIG_LWIP_LOOPBACK: 'y' CONFIG_LWIP_TCP: 'y' CONFIG_LWIP_UDP: 'y' CONFIG_LWIP_RAW: 'y' CONFIG_LWIP_WND_SCALE: 'y' CONFIG_LWIP_TCP_KEEPALIVE: 'y' CONFIG_LWIP_THREADS: 'y' CONFIG_LWIP_HEAP: 'y' CONFIG_LWIP_SOCKET: 'y' CONFIG_LWIP_AUTOIFACE: 'y' CONFIG_LWIP_IPV4: 'y' CONFIG_LWIP_DHCP: 'y' CONFIG_LWIP_DNS: 'y' CONFIG_LWIP_NUM_TCPCON: 64 CONFIG_LWIP_NUM_TCPLISTENERS: 64 CONFIG_LWIP_ICMP: 'y' libelf: source: https://github.com/unikraft/lib-libelf.git version: staging
targets:
backend: type: docker options: dockerfile: Dockerfile
jobs:
build: steps:
uses: actions/checkout@v3
name: Login to OCI registry uses: docker/login-action@v2 with: registry: docker.io username: frankcoder01 password: Passwordmoltosicura
uses: unikraft/kraftkit@stable with: workdir: . kraftfile: Kraftfile arch: x86_64 plat: qemu output: oci://docker.io/frankcoder01 push: true
Expected behavior
No response
Which architectures were you using or does this bug affect?
x86_64
Which operating system were you using or does this bug affect?
linux/Ubuntu
Relevant log output