From ec0bc00253b68e05647ca9341eef4df052423c1e Mon Sep 17 00:00:00 2001 From: Vanessa Sochat Date: Sun, 25 Aug 2019 16:16:02 -0400 Subject: [PATCH] adding dockerfile Signed-off-by: Vanessa Sochat --- Dockerfile | 16 ++++++++++++++++ README.md | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..c048812b90 --- /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 c94dc59785..0a44abbc91 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'.