feat: teapot wrapper
This commit is contained in:
parent
5db41b8728
commit
0a2e42ae7b
|
@ -9,14 +9,14 @@ RUN apt-get update && \
|
||||||
userdel -r node && \
|
userdel -r node && \
|
||||||
useradd -u 1000 -ms /bin/bash tt && \
|
useradd -u 1000 -ms /bin/bash tt && \
|
||||||
useradd -u 1001 -ms /bin/bash student && \
|
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
|
# install joint-teapot
|
||||||
# TODO: change it to FOCS gitea mirror for deployment
|
# 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
|
RUN pip install git+https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot --break-system-packages
|
||||||
|
|
||||||
# install joj3 binary
|
# install joj3 & teapot wrapper
|
||||||
COPY bin/joj3 /usr/local/bin/
|
COPY bin/joj3 bin/joj3-teapot /usr/local/bin/
|
||||||
|
|
||||||
USER student
|
USER student
|
||||||
WORKDIR /home/student
|
WORKDIR /home/student
|
||||||
|
|
|
@ -4,6 +4,7 @@ FOCS docker images used by [act_runner](https://gitea.com/gitea/act_runner) to r
|
||||||
|
|
||||||
Check <https://gitea.com/gitea/runner-images> for information about base images.
|
Check <https://gitea.com/gitea/runner-images> 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`
|
||||||
|
|
6
bin/joj3-teapot
Executable file
6
bin/joj3-teapot
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# TODO: real teapot commands
|
||||||
|
/usr/local/bin/joint-teapot --help
|
Loading…
Reference in New Issue
Block a user