Skip to content

imincik/containerfile-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Dockerfile/Containerfile with Nix

buildContainerFile is a Nix function to build an OCI container image from your Dockerfile or Containerfile script. Build is performed in a super lightweight VM with Nix sandbox relaxed to enable Internet access.

Cowsay example

  nix build -L --option sandbox relaxed --builders "" github:imincik/containerfile-nix#cowsay-example
  • Run container with podman
  podman load -i ./result/cowsay.tar
  podman run localhost/cowsay:test /usr/games/cowthink "It works !"
   ____________
  ( It works ! )
   ------------
          o   ^__^
           o  (oo)\_______
              (__)\       )\/\
                  ||----w |
                  ||     ||

Sl example

  nix build -L --option sandbox relaxed --builders "" github:imincik/containerfile-nix#sl-example
  • Run container with podman
  podman load -i ./result/sl.tar
  podman run -t localhost/sl:test

  Enjoy the train ...

Usage

Check out build-containerfile.nix file.

About

Build Dockerfile / Containerfile with Nix

Resources

Stars

Watchers

Forks

Packages

No packages published