From 20f6735fb6b8a77bac28ca1c1f0d1ef41ca0f5c9 Mon Sep 17 00:00:00 2001 From: caikn Date: Wed, 22 Dec 2021 14:53:40 +0100 Subject: [PATCH] Update Dockerfile 1. install always the latest code-server version with the install.sh script 2. add python3.6 Tested successfully in DI Cloud version 2110 --- GitWorkflow/vscode-app/Dockerfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/GitWorkflow/vscode-app/Dockerfile b/GitWorkflow/vscode-app/Dockerfile index 6a6f1ac..3de9f9c 100644 --- a/GitWorkflow/vscode-app/Dockerfile +++ b/GitWorkflow/vscode-app/Dockerfile @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y \ vim \ curl \ wget \ + python3.6 \ && rm -rf /var/lib/apt/lists/* RUN locale-gen en_US.UTF-8 @@ -17,9 +18,8 @@ RUN locale-gen en_US.UTF-8 ENV LC_ALL=en_US.UTF-8 \ SHELL=/bin/bash -RUN wget https://github.com/cdr/code-server/releases/download/2.1698/code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz -#COPY code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz /code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz -RUN tar xvfz /code-server2.1698-vsc1.41.1-linux-x86_64.tar.gz +# install the latest version +RUN curl -fsSL https://code-server.dev/install.sh | sh RUN groupadd -g 999 coder && \ useradd -r -u 999 -g coder coder && \ @@ -27,13 +27,9 @@ RUN groupadd -g 999 coder && \ chown coder:coder /home/coder USER 999:999 - -WORKDIR /home/coder - EXPOSE 3000 - ENV HOME /home/coder ENV GIT_DISCOVERY_ACROSS_FILESYSTEM 1 ENTRYPOINT ["dumb-init", "--"] -CMD ["bash", "-c", "exec /code-server2.1698-vsc1.41.1-linux-x86_64/code-server --port 3000 --auth none /vhome"] +CMD ["bash", "-c", "exec code-server --host 0.0.0.0 --port 3000 --auth none /vhome"]