Closed ThinkChaos closed 2 years ago
@ThinkChaos are you able to create a PR and we can have @roberth review?
There might be a better approach
I was thinking we could change the default of services.<name>.image.name
.
Do you happen to know why this has become necessary? It seems that podman has changed.
It might be a bit of a breaking change, so we could use some sort of rationale.
I've also created https://github.com/hercules-ci/arion/pull/148 in the meanwhile, which is running into the same issue. Don't know if the fix to this problem needs the rest of the update, so fyi.
Do you happen to know why this has become necessary?
It sounds like something changed the default registry to docker.io. I don't have access to a computer at the moment so not too sure what, but it seems the NixOS default configuring registries has docker.io as the main one since 2 years. Maybe a podman module change made it active, or a podmand code change?
Anyways adding localhost/
explicit in the default sounds like a good thing to me.
Done in #148.
It might be a bit of a breaking change
Realistically, I don't think anyone depends on the name, as it's an implementation detail when considering the "normal" use cases and what's documented. Famous last words of course ;) but the choice is between "move fast and break things" or stagnation. If it's more breaking than I expected, I'll be happy to take a test case for your use case. (And that's in general)
Thanks!
With the current code I'm getting an error about the arion generated image not being found. Here's the log for the webserver example:
Set
services.webserver.build.imageName = lib.mkForce "localhost/webserver";
fixes the issue. I think the fix would be to add thelocalhost/
prefix in src/nix/modules/service/image.nix. There might be a better approach I missed since this is the first time I'm looking at arion's code.