| 9 Feb 2024 |
pgibson | It produces a result symlink to the actual image, which you can podman load -i result | 01:56:15 |
treed | If you include that flake as in input (and then include it in the arguments to outputs, then you should be able to reference as like someDockerImage.dockerImages.site1 | 01:56:37 |
treed | Although I'm not sure how to get that into podman declaratively | 01:57:27 |
pgibson | Okay thanks I'll give it a go - appreciate your help | 01:57:49 |
treed | Looks like you might be able to use a bit like in https://nixos.wiki/wiki/Podman | 01:58:08 |
treed | but instead of image = whatever, you'd want imageFile = dockerImages.site1 | 01:58:36 |
treed | I think that might do it | 01:58:48 |
pgibson | I think I recall seeing other people pushing the images to the Docker registry so they could then use the registry url in the Podman service, but hoping to avoid that if possible | 01:58:52 |
treed | Depending on exactly how podman load works I guess | 01:59:14 |
treed | But it's certainly where I'd start | 01:59:28 |
pgibson | Yeah that's working, thanks again treed . You still need to specify image = "the-actual-image-name" as well as imageFile = someDockerImage.dockerImages.site1 | 02:54:54 |
treed | Oh, interesting. | 02:55:14 |
treed | Glad to help! | 02:55:45 |
pgibson | And not sure what happens if image = doesn't match - maybe it will run a separate image pulled from docker hub instead | 02:56:07 |
treed | Do oci images have a notion of a name internally? | 03:00:09 |
treed | oh yes you're right | 03:00:30 |
treed |
The `image` attribute must match the name and
tag of the image contained in this file, as they will be used to
run the container with that image. If they do not match, the
image will be pulled from the registry as usual.
| 03:00:37 |
treed | uhhh not sure what happened there | 03:00:43 |
pgibson | If you prefix the image name with localhost it will prevent it from downloading a new image, eg image = "localhost/hello-world"; fails rather than downloading the hello-world docker hub image | 03:12:48 |
pgibson | So that seems like a good measure | 03:13:51 |
pgibson | I've got a problem with colmena build caching the old version of the flake that builds the dockerImage after making changes to it | 03:32:49 |
pgibson | Is this due to the flake.lock? | 03:33:34 |
pgibson | If I delete the lock file then it picks up the changes | 03:40:41 |
pgibson | Is there something like --upgrade? | 03:40:48 |
pgibson | Is this the correct way to import a flake from a subdir? ``` inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; dockerSshTunnel.url = "path:./docker-ssh-tunnel"; };
| 03:44:30 |
pgibson | * Is this the correct way to import a flake from a subdir?
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
dockerSshTunnel.url = "path:./docker-ssh-tunnel";
};
| 03:44:43 |
pgibson | Or should I be using imports = [...] | 03:51:11 |
treed | If you want to update an input, it's nix flake lock --update-input $input-name | 23:24:22 |
treed | That'll update to the latest version | 23:24:32 |
treed | And I have no experience with local flakes, other than knowing that . is a reference to the local flake. So maybe just ./docker-ssh-tunnel | 23:25:18 |