generated from aleksrutins/reason-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1320c22
commit 6104546
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Packsnap | ||
Packsnap is a pure-Nix library (based on flakes) for building Docker images with little to no configuration. Heavily inspired by [Nixpacks](https://nixpacks.com). | ||
|
||
[![FlakeHub](https://img.shields.io/endpoint?url=https://flakehub.com/f/aleksrutins/packsnap/badge)](https://flakehub.com/flake/aleksrutins/packsnap) | ||
|
||
## Usage | ||
To use it, just add a `flake.nix` to your project (using whatever output name you want, `my-image` is just an example): | ||
```nix | ||
{ | ||
description = "My fantastic new containerized project"; | ||
inputs.packsnap.url = "https://flakehub.com/f/aleksrutins/packsnap/*.tar.gz"; | ||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
outputs = { self, nixpkgs, flake-utils, packsnap }: flake-utils.lib.eachDefaultSystem (system: { | ||
packages.my-image = packsnap.lib.${system}.build { name = "my-image"; path = ./.; }; | ||
}); | ||
} | ||
``` | ||
|
||
and build it with: | ||
``` | ||
$ nix build .#my-image | ||
$ docker load < result | ||
``` |