From 0a2e42ae7ba415c799e45af660c1613ae2cf2791 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 12 Sep 2024 19:08:33 -0400 Subject: [PATCH] feat: teapot wrapper --- Dockerfile | 6 +++--- README.md | 5 +++-- bin/.gitkeep | 0 bin/joj3-teapot | 6 ++++++ 4 files changed, 12 insertions(+), 5 deletions(-) delete mode 100644 bin/.gitkeep create mode 100755 bin/joj3-teapot diff --git a/Dockerfile b/Dockerfile index 30bbb2a..5ca374c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,14 +9,14 @@ RUN apt-get update && \ 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 + echo "student ALL=(tt) NOPASSWD:/usr/local/bin/joj3\nstudent ALL=(tt) NOPASSWD:/usr/local/bin/joj3-teapot" > /etc/sudoers.d/joj # install joint-teapot # TODO: change it to FOCS gitea mirror for deployment RUN pip install git+https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot --break-system-packages -# install joj3 binary -COPY bin/joj3 /usr/local/bin/ +# install joj3 & teapot wrapper +COPY bin/joj3 bin/joj3-teapot /usr/local/bin/ USER student WORKDIR /home/student diff --git a/README.md b/README.md index 3126df8..99d1f29 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ FOCS docker images used by [act_runner](https://gitea.com/gitea/act_runner) to r Check for information about base images. -## `/bin` directory +## Quick Start -Put `joj3` binary in it. +1. Put `joj3` into `/bin` +2. `make build && make push` on a machine that can access `focs.ji.sjtu.edu.cn:5000` diff --git a/bin/.gitkeep b/bin/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/bin/joj3-teapot b/bin/joj3-teapot new file mode 100755 index 0000000..6ccf42a --- /dev/null +++ b/bin/joj3-teapot @@ -0,0 +1,6 @@ +#!/usr/bin/bash + +set -e + +# TODO: real teapot commands +/usr/local/bin/joint-teapot --help