#Hi
1 messages ยท Page 1 of 1 (latest)
No, i spawned it with cloak.start(), it works the same i can spawned my own buildkit container ?
Ok, try removing the containers
done
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 ๐
ok so the env var work just like dagger (i could have found this myself ๐ )
Yes, sorry
No i mean i'm the dumb one here haha
But here it fix the certificate issue, can't pus to an http registry right ?
Not at all ahah ๐ I always get confused too
Ok https works now ๐
This may change though. It's just a fast fix to your issue
Sure
Then still have to configure https for make it work, would like to make it work with http registry since it's local
`
query PushImage ($fs: FSID!, $ref: String!) {
core {
filesystem(id: $fs) {
pushImage(ref: $ref)
}
}
}
`
but i dont use it directly i use core.PushImage from github.com/dagger/cloak/examples/alpine/gen/core
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"]}
Oh great directly inside docker configuration, i'll setup everything then. thx a lot ๐