Building in Docker - gdamjan/tt-rss-service GitHub Wiki
You can build this project in docker/podman, using a nixos/nix container. This is a simple approach if you can't (or don't want to) install the Nix tooling and store on your own machine.
Here I mount my ~/src/tt-rss-service/
into the container:
$ podman run -ti --rm \
--net host \
--volume ~/src/tt-rss-service:/work \
nixos/nix:latest
$ nix-build /work/default.nix
…
$ cp /result /work/tt-rss_dev.raw
The nix-build
command results with a symlink, called /result
, to the built squashfs image file. You can copy it to /work to get it outside of the container.
To use your own copy of nixpkgs, you can clone the repo in ~/src/nixpkgs
, then add --volume ~/src/nixpkgs:/nixpkgs --env NIX_PATH=nixpkgs=/nixpkgs
to the podman/docker command.
NOTE: I personally prefer podman to docker, but also I've found that docker has issues when building nix projects. I presume the number of files/directories overwhelms the storage layer of docker.