From 9ccc613ce8b03b24a64132d0ff90fce563335dcc Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Fri, 4 Nov 2022 15:22:50 -0400 Subject: [PATCH 01/13] ADD inserted git tag environment variable into theia-base dockerfile and made directory /etc/anubis/commit --- theia-base/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index 0a2f464..9139bfa 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -1,5 +1,8 @@ # https://github.com/theia-ide/theia-apps/tree/master/theia-cpp-docker +ARG ANUBIS_GIT_COMMIT=latest +ENV ANUBIS_GIT_COMMIT=${GIT_TAG} + ARG NODE_VERSION=18 FROM node:${NODE_VERSION}-bullseye-slim as base @@ -149,6 +152,8 @@ RUN set -ex; \ yarn theia download:plugins; \ wget https://open-vsx.org/api/ms-python/python/${MS_PYTHON_VERSION}/file/ms-python.python-${MS_PYTHON_VERSION}.vsix -O /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /opt/theia/plugins/ms-python.python; \ + mkdir -p /etc/anubis/; + echo ${} unzip -d /opt/theia/plugins/ms-python.python /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ rm /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ sed -i 's/"ms-toolsai.jupyter,ms-python.vscode-pylance"/"ms-toolsai.jupyter"/' /opt/theia/plugins/ms-python.python/extension.vsixmanifest; \ From 495acd6b031790089c1f27677ae894b63923208f Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Fri, 4 Nov 2022 15:36:38 -0400 Subject: [PATCH 02/13] ADD inserted git tag arg in docker compose file for theia-base images --- docker-compose.yml | 3 +++ theia-base/Dockerfile | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e94c20b..51586d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: args: PY_VERSION: '3.8.13' BUILD_THEIA: 'ON' + ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" theia-base-39: image: registry.digitalocean.com/anubis/theia-base:python-3.9 build: @@ -17,6 +18,7 @@ services: args: PY_VERSION: '3.9.13' BUILD_THEIA: 'ON' + ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" theia-base-310: image: registry.digitalocean.com/anubis/theia-base:python-3.10 build: @@ -24,6 +26,7 @@ services: args: PY_VERSION: '3.10.6' BUILD_THEIA: 'ON' + ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" # theia-base-311: # image: registry.digitalocean.com/anubis/theia-base:python-3.11 # build: diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index 9139bfa..c638b48 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -152,9 +152,10 @@ RUN set -ex; \ yarn theia download:plugins; \ wget https://open-vsx.org/api/ms-python/python/${MS_PYTHON_VERSION}/file/ms-python.python-${MS_PYTHON_VERSION}.vsix -O /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /opt/theia/plugins/ms-python.python; \ - mkdir -p /etc/anubis/; echo ${} unzip -d /opt/theia/plugins/ms-python.python /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ + mkdir -p /etc/anubis/COMMIT; \ + echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/COMMIT; \ rm /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ sed -i 's/"ms-toolsai.jupyter,ms-python.vscode-pylance"/"ms-toolsai.jupyter"/' /opt/theia/plugins/ms-python.python/extension.vsixmanifest; \ sed -i '122 s/.*/ match = re.match(r"(\\d+)(?:\\.(\\d+)(?:\\.\\d+)?)?$", version)/' /opt/theia/plugins/ms-python.python/extension/pythonFiles/lib/python/parso/utils.py; \ From ab5fa7713e3eb5fc833e2e951e8ae7e9f68faea8 Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Fri, 4 Nov 2022 16:19:42 -0400 Subject: [PATCH 03/13] CHG changed ARG order in the dockerfile --- theia-base/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index c638b48..152e944 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -1,11 +1,11 @@ # https://github.com/theia-ide/theia-apps/tree/master/theia-cpp-docker -ARG ANUBIS_GIT_COMMIT=latest -ENV ANUBIS_GIT_COMMIT=${GIT_TAG} - ARG NODE_VERSION=18 FROM node:${NODE_VERSION}-bullseye-slim as base +ARG ANUBIS_GIT_COMMIT=latest +ENV ANUBIS_GIT_COMMIT=${GIT_TAG} + ARG DIST=bullseye ENV TZ=America/New_York \ PUID=1001 \ From 932196372969bab7070ac0f23d5a5707112a3b7b Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Thu, 10 Nov 2022 12:10:05 -0500 Subject: [PATCH 04/13] FIX added a back slash to dockerfile --- theia-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index 152e944..c2af5c4 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -152,7 +152,7 @@ RUN set -ex; \ yarn theia download:plugins; \ wget https://open-vsx.org/api/ms-python/python/${MS_PYTHON_VERSION}/file/ms-python.python-${MS_PYTHON_VERSION}.vsix -O /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /opt/theia/plugins/ms-python.python; \ - echo ${} + echo ${} \ unzip -d /opt/theia/plugins/ms-python.python /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /etc/anubis/COMMIT; \ echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/COMMIT; \ From 959c95ae26e949edf282427f846bfd53e8bafc2f Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Sat, 12 Nov 2022 19:46:20 -0500 Subject: [PATCH 05/13] FIX made a small fix that will maybe let container run on IDE --- theia-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index c2af5c4..c4039e0 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -131,7 +131,7 @@ RUN set -ex; \ rm -rf /var/cache/apt/*; \ rm -rf /var/lib/apt/lists/*; \ rm -rf /home/node/*; \ - find / -depth \ + find /usr /home /var -depth \ \( -name .cache -o -name __pycache__ -o -name '*.pyc' -o -name .git -o -name .github \) \ -exec 'rm' '-rf' '{}' '+'; @@ -180,7 +180,7 @@ RUN set -ex; \ rm -rf /usr/share/doc; \ rm -rf /var/lib/apt/lists/*; \ rm -rf /home/node/*; \ - find / -depth \ + find /usr /home /var -depth \ \( -name .cache -o -name __pycache__ -o -name '*.pyc' -o -name .git -o -name .github \) \ -exec 'rm' '-rf' '{}' '+'; \ fi From 5350df9c7605ec2a0981dc8686f7d0d9617e8c2a Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Sat, 12 Nov 2022 20:19:14 -0500 Subject: [PATCH 06/13] FIX deleted echo that wasn't supposed to be there --- theia-base/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index c4039e0..ecfa81b 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -152,7 +152,6 @@ RUN set -ex; \ yarn theia download:plugins; \ wget https://open-vsx.org/api/ms-python/python/${MS_PYTHON_VERSION}/file/ms-python.python-${MS_PYTHON_VERSION}.vsix -O /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /opt/theia/plugins/ms-python.python; \ - echo ${} \ unzip -d /opt/theia/plugins/ms-python.python /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /etc/anubis/COMMIT; \ echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/COMMIT; \ From ac1724e01053b8a238aea6d661c238f787814e17 Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Sat, 12 Nov 2022 20:22:34 -0500 Subject: [PATCH 07/13] FIX moved git commit statements lower down in the code --- theia-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index ecfa81b..062aab7 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -153,9 +153,9 @@ RUN set -ex; \ wget https://open-vsx.org/api/ms-python/python/${MS_PYTHON_VERSION}/file/ms-python.python-${MS_PYTHON_VERSION}.vsix -O /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /opt/theia/plugins/ms-python.python; \ unzip -d /opt/theia/plugins/ms-python.python /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ + rm /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ mkdir -p /etc/anubis/COMMIT; \ echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/COMMIT; \ - rm /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ sed -i 's/"ms-toolsai.jupyter,ms-python.vscode-pylance"/"ms-toolsai.jupyter"/' /opt/theia/plugins/ms-python.python/extension.vsixmanifest; \ sed -i '122 s/.*/ match = re.match(r"(\\d+)(?:\\.(\\d+)(?:\\.\\d+)?)?$", version)/' /opt/theia/plugins/ms-python.python/extension/pythonFiles/lib/python/parso/utils.py; \ wget https://raw.githubusercontent.com/davidhalter/parso/master/parso/python/grammar39.txt -O /opt/theia/plugins/ms-python.python/extension/pythonFiles/lib/python/parso/python/grammar39.txt; \ From 90b90738e7e833496ae6f3dc796ce605beec6947 Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Sat, 12 Nov 2022 20:38:43 -0500 Subject: [PATCH 08/13] FIX moved git commit statements to # PRETTY SHELL NECESSARY section --- theia-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index 062aab7..77dc0c6 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -154,8 +154,6 @@ RUN set -ex; \ mkdir -p /opt/theia/plugins/ms-python.python; \ unzip -d /opt/theia/plugins/ms-python.python /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ rm /opt/theia/plugins/ms-python.python-${MS_PYTHON_VERSION}.vsix; \ - mkdir -p /etc/anubis/COMMIT; \ - echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/COMMIT; \ sed -i 's/"ms-toolsai.jupyter,ms-python.vscode-pylance"/"ms-toolsai.jupyter"/' /opt/theia/plugins/ms-python.python/extension.vsixmanifest; \ sed -i '122 s/.*/ match = re.match(r"(\\d+)(?:\\.(\\d+)(?:\\.\\d+)?)?$", version)/' /opt/theia/plugins/ms-python.python/extension/pythonFiles/lib/python/parso/utils.py; \ wget https://raw.githubusercontent.com/davidhalter/parso/master/parso/python/grammar39.txt -O /opt/theia/plugins/ms-python.python/extension/pythonFiles/lib/python/parso/python/grammar39.txt; \ @@ -186,6 +184,8 @@ RUN set -ex; \ # PRETTY SHELL NECESSARY RUN set -ex; \ + mkdir -p /etc/anubis/COMMIT; \ + echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/COMMIT; \ mkdir -p /etc/anubis/skel/; \ mkdir -p /etc/anubis/init.d/; \ chsh -s /usr/bin/zsh ${USER}; \ From 80616ad7d57de5b3e0d8ad2e30dba47e082e7e37 Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Sat, 12 Nov 2022 21:50:56 -0500 Subject: [PATCH 09/13] FIX echo contents of env variable to text file in /etc/anubs/commit/ --- theia-base/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index 77dc0c6..6f9fb3d 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -184,10 +184,10 @@ RUN set -ex; \ # PRETTY SHELL NECESSARY RUN set -ex; \ - mkdir -p /etc/anubis/COMMIT; \ - echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/COMMIT; \ mkdir -p /etc/anubis/skel/; \ mkdir -p /etc/anubis/init.d/; \ + mkdir -p /etc/anubis/commit/; \ + echo ${ANUBIS_GIT_COMMIT} > /etc/anubis/commit/anubis_commit.txt; \ chsh -s /usr/bin/zsh ${USER}; \ git clone https://github.com/robbyrussell/oh-my-zsh.git /opt/oh-my-zsh; \ git clone https://github.com/Aloxaf/fzf-tab.git /opt/oh-my-zsh/custom/plugins/fzf-tab; \ From 533e92082460e7cc5d72cfa0cf2ba336940ea4cc Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Sun, 13 Nov 2022 20:00:50 -0500 Subject: [PATCH 10/13] FIX fixed ANUBIS_GIT_COMMIT env variable in dockerfile --- theia-base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theia-base/Dockerfile b/theia-base/Dockerfile index 6f9fb3d..4f2eec3 100644 --- a/theia-base/Dockerfile +++ b/theia-base/Dockerfile @@ -4,7 +4,7 @@ ARG NODE_VERSION=18 FROM node:${NODE_VERSION}-bullseye-slim as base ARG ANUBIS_GIT_COMMIT=latest -ENV ANUBIS_GIT_COMMIT=${GIT_TAG} +ENV ANUBIS_GIT_COMMIT=${ANUBIS_GIT_COMMIT} ARG DIST=bullseye ENV TZ=America/New_York \ From d56e0252dd2f33d9ddff245a927871fc7dcff97b Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Mon, 14 Nov 2022 00:31:59 -0500 Subject: [PATCH 11/13] FIX changed anubis_git_commit to an environment variable --- docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 51586d3..0a0605e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: args: PY_VERSION: '3.8.13' BUILD_THEIA: 'ON' + environment: ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" theia-base-39: image: registry.digitalocean.com/anubis/theia-base:python-3.9 @@ -18,6 +19,7 @@ services: args: PY_VERSION: '3.9.13' BUILD_THEIA: 'ON' + environment: ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" theia-base-310: image: registry.digitalocean.com/anubis/theia-base:python-3.10 @@ -26,6 +28,7 @@ services: args: PY_VERSION: '3.10.6' BUILD_THEIA: 'ON' + environment: ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" # theia-base-311: # image: registry.digitalocean.com/anubis/theia-base:python-3.11 From bf03c78f3d58991089ae1e4647cbb3eae7f9e3eb Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Mon, 14 Nov 2022 00:35:01 -0500 Subject: [PATCH 12/13] FIX changed anubis_git_commit to an environment variable --- docker-compose.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0a0605e..dacf33c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,8 @@ services: args: PY_VERSION: '3.8.13' BUILD_THEIA: 'ON' - environment: - ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" + environment: + ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" theia-base-39: image: registry.digitalocean.com/anubis/theia-base:python-3.9 build: @@ -19,8 +19,8 @@ services: args: PY_VERSION: '3.9.13' BUILD_THEIA: 'ON' - environment: - ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" + environment: + ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" theia-base-310: image: registry.digitalocean.com/anubis/theia-base:python-3.10 build: @@ -28,8 +28,8 @@ services: args: PY_VERSION: '3.10.6' BUILD_THEIA: 'ON' - environment: - ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" + environment: + ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" # theia-base-311: # image: registry.digitalocean.com/anubis/theia-base:python-3.11 # build: From 4b2e0417e43a1c7a4bcc57a82afe55070a59ca08 Mon Sep 17 00:00:00 2001 From: Chliu88 Date: Mon, 14 Nov 2022 00:38:27 -0500 Subject: [PATCH 13/13] FIX changed anubis_git_commit to an environment variable --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dacf33c..82ea456 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: PY_VERSION: '3.8.13' BUILD_THEIA: 'ON' environment: - ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" + - "ANUBIS_GIT_COMMIT=${GIT_TAG:-latest}" theia-base-39: image: registry.digitalocean.com/anubis/theia-base:python-3.9 build: @@ -20,7 +20,7 @@ services: PY_VERSION: '3.9.13' BUILD_THEIA: 'ON' environment: - ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" + - "ANUBIS_GIT_COMMIT=${GIT_TAG:-latest}" theia-base-310: image: registry.digitalocean.com/anubis/theia-base:python-3.10 build: @@ -29,7 +29,7 @@ services: PY_VERSION: '3.10.6' BUILD_THEIA: 'ON' environment: - ANUBIS_GIT_COMMIT: "${GIT_TAG:-latest}" + - "ANUBIS_GIT_COMMIT=${GIT_TAG:-latest}" # theia-base-311: # image: registry.digitalocean.com/anubis/theia-base:python-3.11 # build: