-
@stitch10925 You can disable certificate verification for this registry through the Buildx builder configuration. The Build Image step currently reserves
--outputand does not exposeregistry.insecureas an output setting, so it cannot be supplied through More Options.For your current HTTPS through Caddy setup, assuming you use a Docker executor:
-
On the machine that runs the build, create a file named
onedev-buildkitd.tomlcontaining:[registry."onedev.lan"] insecure = trueReplace
onedev.lanwith the registry hostname used in your image tag. Include the port if your image tag includes one, for exampleonedev.lan:8443. Do not includehttps://or the project/image path. -
Create a builder using that file:
docker buildx create --name onedev-local-registry \ --driver docker-container \ --buildkitd-config ./onedev-buildkitd.toml docker buildx inspect onedev-local-registry --bootstrapRun these commands as the OS user whose Docker client runs the job, using the same Docker daemon as the executor. This creates a separate builder and preserves your existing builder/cache. Docker documents this configuration mechanism in Configure BuildKit.
-
In Administration → Job Executors, edit the Docker executor used by the job. Under More Settings, set Buildx Builder to
onedev-local-registryand save. Keep the build step's output as Push to container registry, keep your registry credentials, and remove the attempted--output/registry.insecure=trueadditions from More Options.
If OneDev or its agent runs in a container, its Docker client must also see the builder you created. When creating it on the host, add a bind mount such as
-v /absolute/path/to/host-user/.docker/buildx:/root/.docker/buildxto the existing server/agent container configuration (adjust the destination for its actual user). For remote Docker executors, configure every eligible agent. These deployment details are covered in the OneDev registry guide.For plain HTTP, use
http = trueinstead ofinsecure = truein the TOML file. They are different settings: HTTP transport versus skipping HTTPS certificate verification. See Docker's registry configuration.Since you have Caddy's local CA, another option is to configure
ca = ["/absolute/path/to/caddy-root.crt"]instead ofinsecure = truebefore creating the builder, which retains certificate verification. If an error specifically mentions fetching an authentication token, the Docker/Buildx client may also need to trust that CA.Does this get the push working? If it still fails, please share the exact error, your OneDev version, executor type, and whether the server/agent runs in Docker so we can give instructions for that setup.
-
-
With
registry.insecure=trueis was trying to avoid having to create a new build configuration; otherwise, I could have simply created a new build configuration using thehttp = trueflag. Willregistry.insecure=truebe exposed via the build step configuration, for example as slider? That would make the whole process a lot more simple and wouldn't require me to create new build configurations on every agent. -
@stitch10925 Understood—you want this configured once in the build step, without setting up a custom Buildx builder on every agent. The Build Image step currently has no setting for
registry.insecure=true.@robin Could you decide whether to expose this as an option under Push to container registry? The per-agent builder workaround does not meet the requested workflow. This needs a feature decision before we can confirm whether it will be added.
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Hey everyone,
I am running OneDev internally only, so I had it hosted on http. However, when I try to push to a local registry, all sorts of errors pop up. I read the instructions on how to allow insecure registries, but that process seems very cumbersome, and to be honest, I understand only about half of what is written there.
Instead, I tried using local https using Caddy's local certificate root. I have gotten everything working except for one thing: pushing to the registry. On the same documentation page for the isecure registry, there is a mention of creating a new buildx definition with a parameter to disable the certificate check. But again, I don't understand what I have to do.
I was wondering if disabling certificate checks would be possible. Buildx has a
registry.insecure=trueflag that can be passed in the--outputparameter, but when I go to the build step'sMore Settings > More Optionsand I try to add--output registry.insecure=true, I get error:Option '--output' is reserved. If I add it without the--outputit gets added to the--pushparameter which does not recognize the flag. Is there a way to setregistry.insecure=trueor can this be added?I hate how cumbersome it is just to push to a local registry 😔