From c9cb62067c7087a3f32ab54206aa007de2218ad6 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Sun, 15 Sep 2024 20:03:22 +0800 Subject: [PATCH] Fix dockerfile and reset Nu config to default (#13851) # Description Fix dockerfile and reset Nu config to default, fetching config file from the remote may cause compatible issues --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 64c37f6230..0ccfc45740 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -10,8 +10,6 @@ LABEL maintainer=nushell 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 \ @@ -23,6 +21,8 @@ RUN echo '/usr/bin/nu' >> /etc/shells \ && mv nu* /usr/bin \ && chmod +x /usr/bin/nu \ && chown -R nushell:nushell /home/nushell/.config/nushell \ + # Reset Nushell config to default + && su -c 'config reset -w' nushell \ && ls /usr/bin/nu_plugin* \ | xargs -I{} su -c 'plugin add {}' nushell \ && rm -rf /tmp/*