nix-samples/flake-rust-docker/README.md

26 lines
499 B
Markdown
Raw Normal View History

2024-03-19 08:21:16 +01:00
# flake-rust-docker
## Building
```sh
> nix build .#packages.x86_64-linux.dockerImage
> podman load < result
> podman run -ti localhost/hello-world:latest
Hello, world!
```
## Developing
```sh
> 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!
```