Commit Graph

45 Commits

Author SHA1 Message Date
Yethal
b44926d597
Pre-register plugins inside docker container (#9533)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->
Plugins bundled with nushell will be kept inside docker container and
preregistered
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2023-06-28 13:04:32 -05:00
Reilly Wood
216d7d035f
Add cross-rs config (#7559)
Cross-compiling Nu can be a little tricky due to dependencies. This PR
makes it easy to use [`cross-rs`](https://github.com/cross-rs/cross), a
popular tool for cross-compiling Rust code using Docker:
```bash
cross build --target aarch64-unknown-linux-musl --release
```

I find this useful for compiling ARM binaries from x64. Easy to add more
target triples later as needed.
2022-12-22 08:52:07 -06:00
metacoma
7e2781a2af
fix docker build (#7422)
# Description

Docker build fails with the latest release 0.72.1
```bash
Sending build context to Docker daemon  3.072kB
Step 1/6 : FROM alpine
 ---> 49176f190c7e
Step 2/6 : LABEL maintainer=nushell
 ---> Using cache
 ---> 7afa6864f008
Step 3/6 : RUN echo '/usr/bin/nu' >> /etc/shells     && adduser -D -s /usr/bin/nu nushell     && mkdir -p /home/nushell/.config/nushell/     && wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_config.nu -O /home/nushell/.config/nushell/config.nu     && wget -q https://raw.githubusercontent.com/nushell/nushell/main/crates/nu-utils/src/sample_config/default_env.nu -O /home/nushell/.config/nushell/env.nu     && cd /tmp     && wget -qO - https://api.github.com/repos/nushell/nushell/releases/latest     |grep browser_download_url     |grep musl     |cut -f4 -d '"'     |xargs -I{} wget {}     && tar -xzf nu*     && chmod +x nu     && mv nu /usr/bin/nu     && chown -R nushell:nushell /home/nushell/.config/nushell     && rm -rf /tmp/*
 ---> Running in fa544239a3ea
Connecting to github.com (140.82.121.4:443)
Connecting to objects.githubusercontent.com (185.199.108.133:443)
saving to 'nu-0.72.1-x86_64-unknown-linux-musl.tar.gz'
nu-0.72.1-x86_64-unk   3% |*                               |  552k  0:00:29 ETA
nu-0.72.1-x86_64-unk  93% |*****************************   | 15.2M  0:00:00 ETA
nu-0.72.1-x86_64-unk 100% |********************************| 16.2M  0:00:00 ETA
'nu-0.72.1-x86_64-unknown-linux-musl.tar.gz' saved
chmod: nu: No such file or directory
```
2022-12-10 09:22:23 -06:00
pwygab
01386f4d58
adds a config reset command (#6149)
* moves config files to nu_utils

* fmt

* fix dockerfile

* fix docs
2022-07-31 20:44:33 -05:00
Yethal
6ee13126f7
Update Dockerfile (#5910)
Container now uses unpriviledged user with UID 1000 by default
Container now uses Alpine as base
Final image size dropped to just 67MB
2022-06-29 18:36:24 -05:00
Justin Ma
848ff8453b
feat: Update dockerfile for latest nu release (#5843) 2022-06-21 18:28:31 +08:00
Justin Ma
257290acc2
Add a dockerfile example based on debian bullseye-slim (#5176)
* feat: add nu dockerfile, based on debian bullseye

* use aria2 instead of wget for bad network

* some small fix
2022-04-13 14:48:54 +03:00
JT
cdc8e67d61
Remove unused repo parts (#4271)
* Remove unused repo parts

* Update README

* cargo fmt
2022-01-26 07:31:04 +11:00
Jonathan Turner
6951fb440c
Remove it expansion (#2701)
* Remove it-expansion, take 2

* Cleanup

* silly update to test CI
2020-10-26 19:55:52 +13:00
Ryuichi Watanabe
de5cd4ec23
Fix Dockerfile (cache clear of apt) (#2394) 2020-08-24 05:24:49 +12:00
Joseph T. Lyons
053bd926ec
First pass at updating all documentation formatting and cleaning up output of examples (#2031) 2020-06-24 06:21:47 +12:00
Waldir Pimenta
5ca9e12b7f
Fix whitespace and typos (#1481)
* Remove EOL whitespace in files other than docs

* Break paragraphs into lines

See http://rhodesmill.org/brandon/2012/one-sentence-per-line/ for the rationale

* Fix various typos

* Remove EOL whitespace in docs/commands/*.md
2020-03-14 06:23:41 +13:00
Jason Gedge
b2c5af457e
Move most of the root package into a subcrate. (#1445)
This improves incremental build time when working on what was previously
the root package. For example, previously all plugins would be rebuilt
with a change to `src/commands/classified/external.rs`, but now only
`nu-cli` will have to be rebuilt (and anything that depends on it).
2020-03-04 13:58:20 -05:00
Jonathan Turner
11e4410d1c
Merge pull request #806 from DrSensor/ci/github/quay.io
ci(github): replace docker.pkg.github.com with quay.io
2019-11-12 12:03:00 +13:00
Fahmi Akbar Wildana
7cf3c6eb95
Move env declaration to jobs.docker 2019-11-11 07:51:41 +07:00
Jonathan Turner
c42d97fb97 try again 2019-11-08 08:00:46 +13:00
Jonathan Turner
13314ad1e7 try again 2019-11-08 07:54:52 +13:00
Jonathan Turner
1cca5557b1 Second attempt to remove rust-toolchain 2019-11-08 07:27:39 +13:00
Jonathan Turner
c01b602b86
Update docker to stable 2019-11-08 06:34:53 +13:00
Vanessa Sochat
64345b2985
dont run nu at end of release build
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-09-29 17:18:35 -04:00
Jonathan Turner
f99d38ead4
Merge pull request #625 from DrSensor/master
Publish various docker image on git-tag
2019-09-24 05:10:47 +12:00
Jonathan Turner
8d5b1ad233
Merge pull request #656 from jankoprowski/debian
Introduce debian packaging
2019-09-20 06:34:29 +12:00
Jan Koprowski
a96836facb Use tags instead container id and add all binaries to debian/install 2019-09-19 17:57:36 +02:00
Jan Koprowski
85a5ed70b1 Replace command with <image-id> 2019-09-19 08:16:39 +02:00
Jan Koprowski
a8e2801e0b Enhance docker/packaging/README.md about issue links 2019-09-18 17:43:06 +02:00
Jan Koprowski
c9310265fe Remove Dockerfile.bionic from docker directory 2019-09-18 17:04:31 +02:00
Jan Koprowski
4ad249694f Base on quay.io/nushell/nu-base:latest image 2019-09-16 19:55:53 +02:00
Vanessa Sochat
579c7ff6d6
updating base to 18.04
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-09-13 08:46:52 -04:00
Jan Koprowski
a215997dcd Introduce debian packaging 2019-09-12 19:59:40 +02:00
Vanessa Sochat
6fe211fdbe
changing base image to use updated libssl, adding tests to run --help for nu
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-09-12 12:46:16 -04:00
Vanessa Sochat
1f3f3d3105
adding missing docker dependencies openssl and pkgconfig
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-09-11 13:44:23 -04:00
Fahmi Akbar Wildana
9dc58247e5 Fix wrong patch on glibc-busybox
because distroless/cc doesn't contain libz
2019-09-11 23:49:11 +07:00
Fahmi Akbar Wildana
62e6cc4dae
Add libgcc_s.so.1 for glibc-busybox 2019-09-11 09:38:22 +07:00
Fahmi Akbar Wildana
095e5ac69f
Add librt.so.1 for glibc-busybox 2019-09-11 09:10:38 +07:00
Fahmi Akbar Wildana
149ccc4fd3
Fix glibc-{busybox,distroless}
* Add libdl.so.2 for glibc-busybox

* Change base-image of glibc-distroless to gcr.io/distroless/cc
2019-09-11 06:41:37 +07:00
Fahmi Akbar Wildana
0ca7aaa56f
Add libz for glibc-{busybox,distroless}
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
2019-09-09 16:45:55 +07:00
Fahmi Akbar Wildana
d900d8b4c7
Fix can't execute entrypoint
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
2019-09-09 05:41:58 +07:00
Fahmi Akbar Wildana
99d5dae83a
Fix artifact is missing
Signed-off-by: Fahmi Akbar Wildana <f.a.wildana@gmail.com>
2019-09-09 04:20:08 +07:00
Vanessa Sochat
24ba0d93c7
test building akin to azure-pipelines (without release) to hopefully shorten circleci builds
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-09-08 15:44:52 -04:00
Fahmi Akbar Wildana
21896b200c Add busybox as base image 2019-09-08 22:31:10 +07:00
Fahmi Akbar Wildana
c9c9112155
Build and publish docker img along with nu plugins
* Add Package.Dockerfile as flexible build source

* Add docker-compose.package.yml as intermediary config

* CI will use new github action YAML format

it only publish the docker image on git tag

* Add debian:latest, debian:slim, and alpine as base image

* Add documentation
2019-09-08 21:38:25 +07:00
Vanessa Sochat
2983fc1dea
so close, needed to have quay.io as from image base (not docker hub)
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-08-29 20:56:48 -04:00
Vanessa Sochat
6d0ea5eda4
updating README to include instructions and link for quay.io, and removing multistage build for devel branch
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-08-29 18:45:24 -04:00
Vanessa Sochat
40ca353c48
trivial change to trigger ci
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-08-29 16:52:36 -04:00
Vanessa Sochat
2bae2b57ee
adding two Dockerfiles, one for base image and the other for multistage build, and circleci config to test
Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>
2019-08-27 17:58:45 -04:00