Added more installation instructions (#1468)

* Added Docker image-building instructions in the docs

* Added Nix and NixOS installation instructions
This commit is contained in:
Arian Dehghani 2022-01-10 12:21:04 -08:00 committed by GitHub
parent a46582bda2
commit 034c271f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View File

@ -35,8 +35,10 @@ Installation methods:
- [Fedora](/docs/installation.md#fedora)
- [openSUSE/SLE](/docs/installation.md#opensusesle)
- [Ubuntu/Debian](/docs/installation.md#ubuntudebian)
- [NixOS](/docs/installation.md#nixos)
- [macOS (Homebrew and MacPorts)](/docs/installation.md#macos)
- [Windows](/docs/installation.md#windows)
- [Docker](/docs/installation.md#docker)
#### Binary installation

View File

@ -105,3 +105,32 @@ and install the package:
sudo zypper refresh
sudo zypper install kompose
```
#### NixOS
To install from [Nixpkgs](https://github.com/NixOS/nixpkgs), use [nix-env](https://nixos.org/manual/nix/stable/command-ref/nix-env.html).
```bash
nix-env --install -A nixpkgs.kompose
```
To run `kompose` without installing it, use [nix-shell](https://nixos.org/manual/nix/stable/command-ref/nix-shell.html).
```bash
nix-shell -p kompose --run "kompose convert"
```
#### Docker
You can build an image from the offical repo for [Docker](https://docs.docker.com/engine/reference/commandline/build/) or [Podman](https://docs.podman.io/en/latest/markdown/podman-build.1.html):
```bash
docker build -t kompose https://github.com/kubernetes/kompose.git
```
To run the built image against the current directory, run the following command:
```bash
docker run --rm -it -v $PWD:/opt kompose sh -c "cd /opt && kompose convert"
```