Skip to content

Commit 8295d22

Browse files
committed
Docker image usage
1 parent fb05d77 commit 8295d22

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

book/installation.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,32 @@ Cross Platform installation:
3030

3131
- [npm](https://www.npmjs.com/) (`npm install -g nushell` Note that nu plugins are not included if you install in this way)
3232

33+
## Docker Container Images
34+
35+
Docker images are available from the GitHub Container Registry. An image for the latest release is built regularly
36+
for Alpine and Debian. You can run the image in interactive mode using:
37+
38+
```nu
39+
docker run -it --rm ghcr.io/nushell/nushell:<version>-<distro>
40+
```
41+
42+
Where `<version>` is the version of Nushell you want to run and `<distro>` is `alpine` or the latest supported Debian release, such as `bookworm`.
43+
44+
To run a specific command, use:
45+
46+
```nu
47+
docker run --rm ghcr.io/nushell/nushell:latest-alpine -c "ls /usr/bin | where size > 10KiB"
48+
```
49+
50+
To run a script from the current directory using Bash, use:
51+
52+
```nu
53+
docker run --rm \
54+
-v $(pwd):/work \
55+
ghcr.io/nushell/nushell:latest-alpine \
56+
"/work/script.nu"
57+
```
58+
3359
## Build from Source
3460

3561
You can also build Nu from source. First, you will need to set up the Rust toolchain and its dependencies.

0 commit comments

Comments
 (0)