From e5c19a2c47984af152e5ffa60d336064b8a3a2ec Mon Sep 17 00:00:00 2001 From: tcely Date: Sun, 1 Jun 2025 12:39:10 -0400 Subject: [PATCH] Configure alternatives groups --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aba92a07..735c10eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -362,7 +362,14 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va xxd \ && \ # Link to the current python3 version - ln -v -s -f -T "$(find /usr/local/lib -name 'python3.[0-9]*' -type d -printf '%P\n' | sort -r -V | head -n 1)" /usr/local/lib/python3 && \ + update-alternatives --install /usr/local/lib/python3 python3-lib \ + "$(find /usr/local/lib -name 'python3.[0-9]*' -type d -printf '%P\n' | sort -r -V | head -n 1)" 100 && \ + # Configure the editor and nano alternatives + touch /usr/local/bin/babi /bin/nano && \ + update-alternatives --install /usr/local/bin/nano nano /bin/nano 10 && \ + update-alternatives --install /usr/local/bin/nano nano /usr/local/bin/babi 20 && \ + update-alternatives --install /usr/bin/editor editor /usr/local/bin/babi 50 && \ + rm -v /usr/local/bin/babi /bin/nano && \ # Create a 'app' user which the application will run as groupadd app && \ useradd -M -d /app -s /bin/false -g app app && \