Re:Alpine makes Python Docker builds slower, and images larger
by tazjin on Thursday February 06, 2020 @12:32PM
(#22258124)
> If you want to create docker image of your own app, you probably would use [...]
Nixery can be pointed at your own package set, in fact I do this for deployments of my personal services[0].
This doesn't interfere with any of the local Nix functionality. I find it makes for a pleasing CI loop, where CI builds populate my Nix cache[1] and deployment manifests just need to be updated with the most recent git commit hash[2].
(I'm the author of Nixery)
[0]: https://git.tazj.in/tree/ops/infra/kubernetes/nixery [1]: https://git.tazj.in/tree/ops/sync-gcsr/manifest.yaml#n17 [2]: https://git.tazj.in/tree/ops/infra/kubernetes/tazblog/config...
If you want to create docker image of your own app, you probably would use:
https://nixos.org/nixpkgs/manual/#sec-pkgs-dockerTools
This will produce an exported docker image as tar file, which then you can import it using either docker, or tool like skopeo[1] (which is also included in nixpkgs).
The nix-shell functionality is also quite nice, because it allows you to create common development environment, with all tooling available that one might need to work.
[1] https://github.com/containers/skopeo