https://blue-build.org/ logo
How do you trust self-signed certificates in build...
# questions
l
I’m trying to push to a repo hosted with a self signed certificate. How would I trust the certificate in the bluebuild cli so that the container can access that repo?
a
message has been deleted
g
I think that would have to be a setting you would change for
podman
or
docker
l
Okay so I wanted to be able to trust the repo instead of pushing insecure. Im able to trust the repo in the workflow container, but bluebuild seems to build the image and not use the system certs to push. In the workflow container I can verify the cert but the bluebuild cli won’t accept it. I also tried using the archive option but there must be a —push option hardcoded into the bluebuild cli prebuilt container because it gives me the “can’t archive with push enabled” error even with BUILD_AND_PUSH=false. I’m not sure where bluebuild is saving the built images, but I can’t find them anywhere on the workflow container so I can’t manually push them either.
g
Ah so the Github Action uses
docker buildx
so it spins up a buildkit container that does the actual image building. It should be labeled as
bluebuild
when you run
docker buildx ls
. I'm not sure what you'll need to do for that, but that should help point you in the right direction
l
So I managed to get the build working by manually creating an archive with
docker buildx build
and then using skopeo to copy it to remote since those programs seem to listen to the system certificates
Is there a way for me to get bluebuild to listen to the certificates instead? I'm trying to generate a workflow for creating ISO's and I'm running into the same problem. the iso generation is a little more involved so it would be really nice if I didn't have to do that manually
by "listen" I mean read and use
I tried creating a custom image and setting the JASONN3_INSTALLER_IMAGE variable in the build env but it looks like it doesn't listen to that env var.
Might be nice to have a Containerfile in the github repo so I can build my own version of the cli unless there's a way of building this ISO more easily. I've tried a bunch of different strats to get the bluebuild containers to use the system certificates, but nothing has worked so far.
g
We use
earthly
for our builds. I have to work on migrating to
earthbuild
though since that's the maintained fork
This is the closest I'm seeing to a solution https://github.com/docker/buildx/issues/80#issuecomment-1275661634
In this instance you would want to do this as a step before bluebuild in your github action workflow
l
Thanks for this! I’ll try to get it working with this.
g
The
update-ca-trust
should be on the next line as a separate command
Dude formatted it badly
5 Views