8000 GitHub - surma/containix
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

surma/containix

Repository files navigation

Containix

Containix is a containerization tool that relies on Nix to define and build the container environment rather than using images of Linux system file trees like Docker does.

Containix uses Nix Flakes as the container definition format. Take a look at the examples to get an impression for what that looks like.

Installation

You must have Nix installed for containix to work. Therefore, you can run containix directly via nix:

$ nix run github:surma/containix

Usage

Run a flake inside a container:

$ containix -f /path/to/flake

This will build the flake’s containix package if it exists, otherwise it will use the default package.

Since any flake expression can be used for the container, you can run the examples from this repository:

$ containix -f 'github:surma/containix?dir=examples/simple_container'

Many of the familiar flags from Docker are supported: -v mounts a host directory into the container, -e set an environment variable and -e expose a port:

$ containix -f 'github:surma/containix?dir=examples/webserver' \
    --volume $PWD:/var/www:ro \
    --port 8080:8123 \
    --env PORT=8123

Write your own container flake:

nix flake init -t github:surma/containix
# ... edit flake.nix ...
containix -f .

Apache License 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0