2024-05-05 22:32:20 +00:00
|
|
|
# Using Lix within Docker
|
2021-11-11 15:03:09 +00:00
|
|
|
|
2024-06-09 02:15:56 +00:00
|
|
|
Lix is available on the following two container registries:
|
|
|
|
- [ghcr.io/lix-project/lix](https://ghcr.io/lix-project/lix)
|
|
|
|
- [git.lix.systems/lix-project/lix](https://git.lix.systems/lix-project/-/packages/container/lix)
|
2024-05-05 22:32:20 +00:00
|
|
|
|
|
|
|
To run the latest stable release of Lix with Docker run the following command:
|
2021-11-11 15:03:09 +00:00
|
|
|
|
|
|
|
```console
|
2024-06-09 02:15:56 +00:00
|
|
|
~ » sudo podman run -it ghcr.io/lix-project/lix:latest
|
|
|
|
Trying to pull ghcr.io/lix-project/lix:latest...
|
|
|
|
|
|
|
|
bash-5.2# nix --version
|
|
|
|
nix (Lix, like Nix) 2.90.0
|
2021-11-11 15:03:09 +00:00
|
|
|
```
|
|
|
|
|
2024-05-05 22:32:20 +00:00
|
|
|
# What is included in Lix's Docker image?
|
2021-11-11 15:03:09 +00:00
|
|
|
|
2024-06-09 02:15:56 +00:00
|
|
|
The official Docker image is created using [nix2container]
|
2021-11-11 15:03:09 +00:00
|
|
|
(and not with `Dockerfile` as it is usual with Docker images). You can still
|
|
|
|
base your custom Docker image on it as you would do with any other Docker
|
|
|
|
image.
|
|
|
|
|
2024-06-09 02:15:56 +00:00
|
|
|
[nix2container]: https://github.com/nlewo/nix2container
|
|
|
|
|
|
|
|
The Docker image is also not based on any other image and includes the nixpkgs
|
|
|
|
that Lix was built with along with a minimal set of tools in the system profile:
|
|
|
|
|
|
|
|
- bashInteractive
|
|
|
|
- cacert.out
|
|
|
|
- coreutils-full
|
|
|
|
- curl
|
|
|
|
- findutils
|
|
|
|
- gitMinimal
|
|
|
|
- gnugrep
|
|
|
|
- gnutar
|
|
|
|
- gzip
|
|
|
|
- iana-etc
|
|
|
|
- less
|
|
|
|
- libxml2
|
|
|
|
- lix
|
|
|
|
- man
|
|
|
|
- openssh
|
|
|
|
- sqlite
|
|
|
|
- wget
|
|
|
|
- which
|
2021-11-11 15:03:09 +00:00
|
|
|
|
2024-05-05 22:32:20 +00:00
|
|
|
# Docker image with the latest development version of Lix
|
2021-11-11 15:03:09 +00:00
|
|
|
|
2024-06-09 02:15:56 +00:00
|
|
|
FIXME: There are not currently images of development versions of Lix. Tracking issue: https://git.lix.systems/lix-project/lix/issues/381
|
2021-11-11 15:03:09 +00:00
|
|
|
|
2024-06-09 02:15:56 +00:00
|
|
|
You can build a Docker image from source yourself and copy it to either:
|
|
|
|
|
|
|
|
Podman: `nix run '.#dockerImage.copyTo' containers-storage:lix`
|
|
|
|
|
|
|
|
Docker: `nix run '.#dockerImage.copyToDockerDaemon'`
|
2021-11-11 15:03:09 +00:00
|
|
|
|
2024-06-09 02:15:56 +00:00
|
|
|
Then:
|
2021-11-11 15:03:09 +00:00
|
|
|
|
|
|
|
```console
|
2024-06-09 02:15:56 +00:00
|
|
|
$ docker run -ti lix
|
2021-11-11 15:03:09 +00:00
|
|
|
```
|