From 897b9e7030b91087b780490b0812831b7be0ebb4 Mon Sep 17 00:00:00 2001 From: David Peter Date: Thu, 11 Oct 2018 20:05:17 +0200 Subject: [PATCH] Add Docker instructions, closes #331 --- README.md | 62 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 5456170c..331df714 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,41 @@ cd /usr/ports/textproc/bat make install ``` +### Via nix + +You can install `bat` using the [nix package manager](https://nixos.org/nix): + +```bash +nix-env -i bat +``` + +### On macOS + +You can install `bat` with [Homebrew](http://braumeister.org/formula/bat): + +```bash +brew install bat +``` + +### On Windows + +You can download prebuilt binaries from the [Release page](https://github.com/sharkdp/bat/releases), +or install it with [scoop](https://scoop.sh/): + +```bash +scoop install bat +``` + +[See below](#using-bat-on-windows) for notes. + +### Via Docker + +There is a [Docker image](https://hub.docker.com/r/danlynn/bat/) that you can use to run `bat` in a container: +```bash +docker pull danlynn/bat +alias bat='docker run -it --rm -e BAT_THEME -v "$(pwd):/myapp" danlynn/bat' +``` + ### Via Ansible You can install `bat` with [Ansible](https://www.ansible.com/): @@ -148,33 +183,6 @@ This should work with the following distributions: - FreeBSD - MacOS -### Via nix - -You can install `bat` using the [nix package manager](https://nixos.org/nix): - -```bash -nix-env -i bat -``` - -### On macOS - -You can install `bat` with [Homebrew](http://braumeister.org/formula/bat): - -```bash -brew install bat -``` - -### On Windows - -You can download prebuilt binaries from the [Release page](https://github.com/sharkdp/bat/releases), -or install it with [scoop](https://scoop.sh/): - -```bash -scoop install bat -``` - -[See below](#using-bat-on-windows) for notes. - ### From binaries Check out the [Release page](https://github.com/sharkdp/bat/releases) for