#Hi

1 messages ยท Page 1 of 1 (latest)

valid ivy
#

No, i spawned it with cloak.start(), it works the same i can spawned my own buildkit container ?

torpid mango
#

Ok, try removing the containers

valid ivy
#

done

torpid mango
#

then:
Please run your buildkit instance with below command (and mount your certs):

docker run --net=host -d --restart always -v $PWD/my-cert.pem:/etc/ssl/certs/my-cert.pem --name dagger-buildkitd --privileged moby/buildkit:latest
#

Then,

export BUILDKIT_HOST=docker-container://dagger-buildkitd
#

(please don't run cloak until the env var is set)

#

Then,

docker run -d --restart=always --name registry --network=container:dagger-buildkitd registry:2
#

Then try again ๐Ÿ˜‡

#

Please keep me in touch ๐Ÿ˜‡

valid ivy
#

ok so the env var work just like dagger (i could have found this myself ๐Ÿ˜… )

valid ivy
#

But here it fix the certificate issue, can't pus to an http registry right ?

torpid mango
valid ivy
#

Ok https works now ๐Ÿ™‚

torpid mango
valid ivy
#

Sure

#

Then still have to configure https for make it work, would like to make it work with http registry since it's local

torpid mango
#

Could you please paste your graphql query ?

#

(currently testing on my side)

valid ivy
#
`
query PushImage ($fs: FSID!, $ref: String!) {
    core {
        filesystem(id: $fs) {
            pushImage(ref: $ref)
        }
    }
}
`
torpid mango
#

Ok, made it work ๐Ÿ’ฅ

#

So, you can remove everything we did before ahah

#

Add this line

  "insecure-registries":["127.0.0.1:5000"]
#

Run you registry that way:

docker run -d --restart=always --name registry --network=container:dagger-buildkitd registry:2
#

I tried in graphQL directly:

{
  core {
    image(ref:"alpine"){
      exec(input:{args:["touch", "/hi"]}){
        fs{
          pushImage(ref:"127.0.0.1:5000/testpush:latest")
        }
      }
    }
  }
}
#
{
  "data": {
    "core": {
      "image": {
        "exec": {
          "fs": {
            "pushImage": true
          }
        }
      }
    }
  }
}
#

To verify:

docker run --network=container:dagger-buildkitd -ti alpine sh
/ # apk add curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
(1/5) Installing ca-certificates (20220614-r0)
(2/5) Installing brotli-libs (1.0.9-r6)
(3/5) Installing nghttp2-libs (1.47.0-r0)
(4/5) Installing libcurl (7.83.1-r3)
(5/5) Installing curl (7.83.1-r3)
Executing busybox-1.35.0-r17.trigger
Executing ca-certificates-20220614-r0.trigger
OK: 8 MiB in 19 packages
/ # curl -X GET http://127.0.0.1:5000/v2/_catalog
{"repositories":["testpush"]}
valid ivy
#

Oh great directly inside docker configuration, i'll setup everything then. thx a lot ๐Ÿ™‚