nix-samples/flake-rust-docker
2024-03-19 08:21:16 +01:00
..
hello-world Adding flake-rust-docker 2024-03-19 08:21:16 +01:00
flake.lock Adding flake-rust-docker 2024-03-19 08:21:16 +01:00
flake.nix Adding flake-rust-docker 2024-03-19 08:21:16 +01:00
README.md Adding flake-rust-docker 2024-03-19 08:21:16 +01:00
rust-toolchain.toml Adding flake-rust-docker 2024-03-19 08:21:16 +01:00

flake-rust-docker

Building

> nix build .#packages.x86_64-linux.dockerImage
> podman load < result
> podman run -ti localhost/hello-world:latest
Hello, world!

Developing

> nix develop
$ gunzip --stdout result > /tmp/image.tar && dive docker-archive:///tmp/image.tar
... this will open dive

$ sudo $(which dockerd)
$ sudo chown -R 1000:1000 /var/run/docker.sock
$ docker load < result
Loaded image: hello-world:latest
$ docker run -ti hello-world:latest
Hello, world!