Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksrutins authored Dec 28, 2023
1 parent 1320c22 commit 6104546
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
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
```

0 comments on commit 6104546

Please sign in to comment.