diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..c048812b9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM rust:1.37-slim + +# docker build -t nu . +# docker run -it nu + +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && apt-get install -y libssl-dev \ + libxcb-composite0-dev \ + libx11-dev \ + pkg-config && \ + mkdir -p /code + +ADD . /code +WORKDIR /code +RUN cargo install nu +ENTRYPOINT ["nu"] diff --git a/README.md b/README.md index 19a9f4ac7..ddb6bc348 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ There is also a [book](https://book.nushell.sh) about Nu, currently in progress. # Installation +## Local + Up-to-date installation instructions can be found in the [installation chapter of the book](https://book.nushell.sh/en/installation). To build Nu, you will need to use the **nightly** version of the compiler. @@ -47,6 +49,21 @@ The following optional features are currently supported: * **rawkey** - direct keyboard input, which creates a smoother experience in viewing text and binaries * **clipboard** - integration with the native clipboard via the `clip` command +## Docker + +Optionally, you can build a container with nu installed using the [Dockerfile](Dockerfile): + +```bash +$ docker build -t nu . +``` + +And then run the container: + +```bash +$ docker run -it nu +/> exit +``` + # Philosophy Nu draws inspiration from projects like PowerShell, functional programming languages, and modern cli tools. Rather than thinking of files and services as raw streams of text, Nu looks at each input as something with structure. For example, when you list the contents of a directory, what you get back is a list of objects, where each object represents an item in that directory. These values can be piped through a series of steps, in a series of commands called a 'pipeline'.