elinks --dump https://github.com/nushell/nushell/releases |
grep -m1 -o https:.*x86_64-unknown-linux-gnu.tar.gz |
rev |
cut -d/ -f2 |
rev # run daemon instance
docker container run -d --name nushell ubuntu:22.04 sleep inf ; sleep 2
# install nushell in instance
docker container exec -i nushell /bin/bash << 'eof'
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y pkg-config libssl-dev jq tree vim curl less elinks
cd /usr/local/bin/
elinks --dump https://github.com/nushell/nushell/releases |
grep -m1 -o https:.*x86_64-unknown-linux-gnu.tar.gz |
xargs curl -Ls |
tar -xzf -
ln -snf ./nu-*-unknown-linux-gnu/nu
yes | nu >& /dev/null
# get rid of ASCII art
sed -i -e '/mode.*rounded/ { s/mode/# mode/ ; s/$/\n mode: none / } ' \
/root/.config/nushell/config.nu
eof
# commit to image
docker container commit nushell nushell
# remove instance
docker container stop nushell ; docker container rm nushell
# run interactive nushell
docker container run --rm -it nushell nu