From 4cc84cd0ea617eda413681fcb66bd0c275be317a Mon Sep 17 00:00:00 2001 From: Eric-2369 Date: Mon, 14 Oct 2024 13:50:00 +0800 Subject: [PATCH] fix: use root user to install code-server --- debian12-codeserver/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian12-codeserver/Dockerfile b/debian12-codeserver/Dockerfile index f589565..a635823 100644 --- a/debian12-codeserver/Dockerfile +++ b/debian12-codeserver/Dockerfile @@ -8,8 +8,6 @@ RUN apt-get update \ RUN useradd --create-home --shell /bin/bash eric2369 \ && echo "eric2369 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd -USER eric2369 - ARG TARGETPLATFORM RUN set -eux; \ case "${TARGETPLATFORM}" in \ @@ -25,9 +23,11 @@ RUN set -eux; \ ;; \ esac; \ curl "${URL}" --location --output /home/eric2369/code-server.deb; \ - sudo dpkg -i /home/eric2369/code-server.deb; \ + dpkg -i /home/eric2369/code-server.deb; \ rm /home/eric2369/code-server.deb +USER eric2369 + RUN set -eux; \ case "${TARGETPLATFORM}" in \ "linux/amd64") \