From 7314fab72d01d153ae8b0192fb30d024316c5169 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Wed, 11 Sep 2024 22:05:30 -0400 Subject: [PATCH 1/5] feat: use ubuntu-latest-slim --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 407d1c6..24acf0a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # syntax=docker/dockerfile:1 -FROM focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest +FROM focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest-slim RUN apt-get update && \ - apt-get install -y sudo && \ + apt-get install -y sudo python3 python3-pip && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ useradd -u 1000 -ms /bin/bash tt && \ -- 2.30.2 From 5487cf7c13730ec73ec4b18e9319bdea56298c28 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Wed, 11 Sep 2024 22:09:07 -0400 Subject: [PATCH 2/5] feat: remove node user --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 24acf0a..a3ea29c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update && \ apt-get install -y sudo python3 python3-pip && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ + userdel -r node && \ useradd -u 1000 -ms /bin/bash tt && \ useradd -u 1001 -ms /bin/bash student && \ echo "student ALL=(tt) NOPASSWD:/usr/local/bin/joj3" > /etc/sudoers.d/joj -- 2.30.2 From df793096b2bd43d55b6c8c7b84d815dae0f94ce8 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Wed, 11 Sep 2024 22:32:21 -0400 Subject: [PATCH 3/5] fix: pipx --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a3ea29c..dcc5cb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest-slim RUN apt-get update && \ - apt-get install -y sudo python3 python3-pip && \ + apt-get install -y sudo python3-minimal pipx git && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* && \ userdel -r node && \ @@ -13,7 +13,8 @@ RUN apt-get update && \ # install joint-teapot # TODO: change it to FOCS gitea mirror for deployment -RUN pip install --no-cache-dir git+https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot +RUN pipx install git+https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot && \ + ln -s /root/.local/bin/joint-teapot /usr/local/bin/joint-teapot # install joj3 binary COPY bin/joj3 /usr/local/bin/ -- 2.30.2 From 736c03cf366a05814a5b8a454e9947975947b30c Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 12 Sep 2024 02:51:12 -0400 Subject: [PATCH 4/5] fix: tag --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 28862c9..94e0769 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ all: build build: - docker build -t focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest . + docker build -t focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest-slim . push: - docker push focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest + docker push focs.ji.sjtu.edu.cn:5000/gitea/runner-images:focs-ubuntu-latest-slim -- 2.30.2 From efcd1b6f6792908afa57a2b5843488c8c7dfde6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=9F=B5=E6=99=A8520370910012?= Date: Thu, 12 Sep 2024 14:56:04 +0800 Subject: [PATCH 5/5] fix(dockerfile): use sjtu mirror for install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王韵晨520370910012 --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index dcc5cb3..0b81825 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,13 @@ FROM focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest-slim +# use sjtug mirror for faster download +RUN rm -rf /etc/apt/sources.list.d/* && cat < /etc/apt/sources.list +deb http://mirror.sjtu.edu.cn/debian bookworm main +deb http://mirror.sjtu.edu.cn/debian-security bookworm-security main +deb http://mirror.sjtu.edu.cn/debian bookworm-updates main +EOF + RUN apt-get update && \ apt-get install -y sudo python3-minimal pipx git && \ apt-get clean && \ -- 2.30.2